-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make brew install $ALIAS
follow alias changes
#567
Comments
Sounds good to me. |
Would this be a reasonable way to do this?
|
@penman Yep, that's the plan! Please feel free to beat me to a PR though 😀 |
If somebody had run But what if they run |
Yep 👍
I think |
👍🎉👍🎉👍🎉 (This was my preference but I didn't want to get into bikeshedding :P) |
So it seems to me them at there are three different ways an aliased formula could be updated:
I'll check these off as I test them and get them working correctly. |
Something that's come up as I've been trying to implement this is that there's no good way to find formula installed with a previous value for an alias after it's changed. The only way I've found to check is to loop through Any ideas? |
Looks good to me, @penman. Using |
This would affect |
@penman How's this looking? |
@MikeMcQuaid My computer and I haven't been getting on well this week, but I've made some good progress today. |
If |
I think either option is probably fine but saying |
And in that situation, would |
I think Worth nothing is that it won't actually be |
Yeah, makes sense. Thanks. |
Just about ready to put up a PR. One more question: how should [
{
"name": "hello@2",
"installed_versions": [
"2.10"
],
"current_version": "2.10"
}
] I guess we'll need a new JSON version, like |
I think that makes sense for [
{
"name": "hello",
"installed_versions": [
"2.10"
],
"current_version": "2.10"
}
] or something, I think? |
I was just worried that doing that could break a JSON consumer that didn't know how to handle Homebrew aliases. Is that something we need to worry about? |
The ideal JSON (that would require a version bump), would look like this, I think: [
{
"name": "hello",
"installed": [
{
"formula": "hello@2",
"version": "2.10"
}
],
"current": {
"formula": "hello@3",
"version": "3.0"
}
}
] |
Or alternatively we could just leave the JSON output as-is for now and consider iteration on it if the previous version causes problems. I think my format would be fine if we assume it's being used to decide whether to run e.g. |
Okay, I'll just leave it for now and get a PR up, then we can take it from there. |
This is done now, right? |
Yes 🎉! Well done @penman! |
If
brew install boost
is an alias tobrew install boost123
then if theboost
alias changes fromboost123
toboost124
thenbrew upgrade
should upgrade between these versions.This will allow us to use the Homebrew versions-style formula naming (or an alternative like @UniqMartin has suggested e.g.
boost+1.2.3
) combined with these aliases to allow us to have formula pinned to versions if they need to be and have users (and some formulae) follow the latest version of e.g.boost
if they don't break on newer versions.When this issue is done we'll have a larger discussion about a new approach to versioning in Homebrew.
The text was updated successfully, but these errors were encountered: