Homebrew / homebrew-cask-versions

💀 Alternate versions of Casks (deprecated)
https://brew.sh
1.18k stars 1.06k forks source link

Instructions unclear #5926

Closed revolter closed 6 years ago

revolter commented 6 years ago

I don't understand how to use this tap. Mainly, searching for available older versions and picking one. The README only features iterm-beta as an example but I'd want for example to install Unity 2018.1.4f1 instead of the latest 2018.1.6 and I don't know how to do that.

vitorgalvao commented 6 years ago

but I'd want for example to install Unity 2018.1.4f1 instead of the latest 2018.1.6 and I don't know how to do that.

That’s not something you’ll find here. We don’t provide every old version, only a specific useful subset. Do brew search unity as usual. If there are older versions, you’ll see the version number in the name. Example: searching for alfred yields alfred and alfred2.

revolter commented 6 years ago

So it doesn't provide previously submitted (via PR) versions? Meaning older .rb files with their possible old URLs?

revolter commented 6 years ago

Let me give you an example:

We have app A. They release version 1. Someone creates a PR to add a cask for it with the URL a.com/dl/1. They release versions 2 and 3. Someone creates a PR to add a cask for the latest one with the URL a.com/dl/3.

I would want to be able to use brew cask install A to install the version 3 and brew cask install A 1 to install the version 1.

I am aware that:

  1. Installing version 2 is not possible because no one created a PR for it.
  2. Installing version 1 may fail if they remove the a.com/dl/1 page.

So:

  1. Instead of being able to install only some version, you would be able to install all the versions that were available on cask.
  2. Instead of requiring manually created .rb files that point to some versions, it would rely on older versions in git that were already created. (In your example, if I'm not mistaken, that alfred2.rb file is actually a duplicate of one of the older versions of alfred.rb which seems kind of superfluous).
commitay commented 6 years ago
  1. Instead of requiring manually created .rb files that point to some versions, it would rely on older versions in git that were already created.

This was implemented for Homebrew formulae and removed because it caused too many problems. Casks would still have similar issues.

commitay commented 6 years ago

For legacy versions of Unity this tap may be of interest.

https://github.com/wooga/homebrew-unityversions

revolter commented 6 years ago

This was implemented with Homebrew formulae

Manually could also be replaced with a separate manual action (as opposed to an automatic flow)

it caused too many problems

Related to their dependencies? As they too should have been downgraded.

revolter commented 6 years ago

For legacy versions of Unity this tap may be of interest.

https://github.com/wooga/homebrew-unityversions

So it isn't possible to have this feature automatically working by replacing separate .rb files with separate versions of the same .rb file from git log?

commitay commented 6 years ago

No, we won't add it as a feature as we don't intend to support installing old versions via git history.

We support the casks as they currently exist on master branch.

revolter commented 6 years ago

If it's not too much (in which case, disregard this message), could you please tell me why is this something you guys don't want to add? As I can't see any disadvantage with my very limited knowledge about Homebrew's internals.

vitorgalvao commented 6 years ago

You’re free to install casks from specific git revision URLs (that works), but that will never be supported. For one, since those are fixed it’s impossible to retroactively fix an old version cask. That alone already makes a maintenance burden not worth supporting.

revolter commented 6 years ago

You’re free to install casks from specific git revision URLs (that works)

Meaning brew cask install unity https://raw.githubusercontent.com/Homebrew/homebrew-cask/fb8aff1ec1dda9057ce8514a5df70c9b186b6a61/Casks/unity.rb? I didn't know this.

For one, since those are fixed it’s impossible to retroactively fix an old version cask.

By "fixed" do you mean when the cask API changes? For example, if the url would be renamed to link? If yes, I am aware that it's very hard to also support older versions with url instead of link, but I am not saying you should. In this case, any older version of a cask that has url instead of link would not be supported at all, and I'm totally fine with it.

I'm not asking for any maintainance at all, only allowing installing any older version for which:

In any other case, you should do nothing at all.

Expanding on my previous example, let's say A releases version 4 and someone creates a PR for it.

Running something like brew cask versions A would print:

1
3
4

(Totally fine and understandable for 2 to be missing)

Running something like brew cask install A 1 could fail with:

Version 1 is not supported anymore!

or

The download link for version 1 is not working anymore!

or

Version 1 can't be installed anymore!

or any other issue that may arrise.

And running something like brew cask install A 3 could succesfully install the version 3.

That alone already makes a maintenance burden not worth supporting.

So there is no maintainance required at all.

commitay commented 6 years ago

That alone already makes a maintenance burden not worth supporting.

So there is no maintainance required at all.

The maintainers (who have to deal with any problems) decide if it's a maintenance burden or not. This has been suggested several times before and whatever benefit it offers does not outweigh the problems that comes with it.

revolter commented 6 years ago

And what would be the problem? Knowing that any problem that may arise will be reported in the terminal via an error message?

commitay commented 6 years ago

Just one example of a problem would be if A 3 installs malware or otherwise breaks the users system? We would need to somehow prevent users from installing that specific version from the history?

revolter commented 6 years ago

I see, thank you for the example. I'm thinking of creating a plugin (if Homebrew supports it, gotta do some research) that adds this feature, knowing that this is not something that's wanted as a first party support, and I guess I'll just print something like Older versions might contain malware or may break your system. Install them at your own risk! and that's it ¯\_(ツ)_/¯.

Thank you again for your time.

vitorgalvao commented 6 years ago

Meaning brew cask install unity https://raw.githubusercontent.com/Homebrew/homebrew-cask/fb8aff1ec1dda9057ce8514a5df70c9b186b6a61/Casks/unity.rb?

No, just brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/fb8aff1ec1dda9057ce8514a5df70c9b186b6a61/Casks/unity.rb. Basically we can install casks (if they’re valid) from a URL.

By "fixed" do you mean when the cask API changes?

No, I mean if the cask has a mistake (like a bad uninstall). This might not even be a mistake we made, but simply something that changed because upstream changed how it was done.

So there is no maintainance required at all.

Sure there is. When people start opening issues because those casks are broken. That will (would) happen and there‘s no point telling people to not open issues related to that, they still would.

I'm thinking of creating a plugin

Go for it! Just know it’ll not be officially sanctioned, and please please do mention that in your README.

Also, before you start any work, think about what you’ll do about casks that are versioned but have unversioned URLs. Those will never work under your system.

revolter commented 6 years ago

Good points you raised, thank you!