Homebrew-cask: Feature: Support the installation of specific versions

Created on 5 Jun 2013  Â·  10Comments  Â·  Source: Homebrew/homebrew-cask

It would be nice if one could install a specific version of a cask app. I envision something like:

$ brew cask install my_app --version=1.0.3

I could see the Cask spec looking something like this to accomodate:

class MyApp < Cask
  url 'http://myapp.com/download/{version}/my_app-{version}.dmg'
  homepage 'http://myapp.com'
  versions [
    { version: '1.0.1', sha1: 'asdf...' },
    { version: '1.0.2', sha1: 'fdas...' },
    ....
  ]
  link 'myapp.app'
end

The url would be treated like a template and the requested version string (or latest if not specified) would be interpolated into the url.

Thoughts? Not sure how much this impacts #142. I think they are orthogonal issues (supporting multiple, independent release channels as opposed to supporting older versions).

Most helpful comment

The best example for this is Vagrant (which breaks compatibility a lot) @vitorgalvao @passcod

All 10 comments

Writing this on a tiny keyboard, so bear with me (even on vacation, I can’t seem to leave this project).

I don’t think that idea fits with the overall goal of _homebrew-cask_; this project is about providing a simple, straight-forward way of of installing applications, not providing “every feature under the sun”. The issue you mentioned (#142) is about providing support for different types of versions — nightly builds and the like — and you’re correct, your proposed functionality is something different altogether.

I don’t want to stretch this too much, but access to older versions is a very niche option, and there are already websites dedicated to that. We couldn’t also reliably provide that feature (few apps have all the older versions publicly available for the taking), and managing that would be extremely hard (sometimes pull requests to this project are for apps that weren’t updated in a long while, we don’t really care about what came in between, nor do I think we should, for the aforementioned reasons).

It would also lead to other issues, since some _casks_ (like brackets) have different executable names for every version, further polluting the _link_ parameter.

I’m leaving this here so @phinze and/or @passcod can add to (or refute) this if they want, but I’m strongly against this, as I really believe it’d create a lot of work with very little return, and would make _casks_ needlessly verbose and complex, when making them simple and easy for new users to contribute is, I believe and have repeatedly stated, of the utmost importance.

Versioning is indeed a Hard Problem, and is not the Homebrew way. Just like homebrew/versions exists, though, if you believe there are some applications that would benefit from having multiple installable versions, you probably could start a homebrew-cask/versions tap?

The best example for this is Vagrant (which breaks compatibility a lot) @vitorgalvao @passcod

@scalp42 We have a place for different versions, now.

The whole issue is that its for alternate versions as in beta or am I missing something?

We’re keeping the current (latest) stable versions in this repo, and everything else in there, for now.

The question is, what is the latest stable? Someone might label it as such, but that doesn't necessarily mean it is true. Using Cask to install Vagrant will install an unusable copy of Vagrant, as Vagrant 1.8.5 breaks compatibility with CentOS 7 (RHEL7) vagrant boxes (https://github.com/mitchellh/vagrant/issues/7627). Vagrant 1.8.4 is compatible with RHEL7. It seems in the Vagrant community, you have some that will say, use that Vagrant version, not that one, depending on what OS they use, and known compatibility with it (as well what provisioners). There are versions seems to break significant functionality in the application. VirtualBox even had the problem, though it occurs less frequently.

The question is, what is the latest stable?

Whatever the developer calls as such. This isn’t subjective, it’s clearly documented.

is this still the case? no specific version for casks?

is this still the case?

Nothing in this issue suggests it will ever be otherwise.

no specific version for casks?

Want specific versions? Go to caskroom/versions.

Was this page helpful?
0 / 5 - 0 ratings