homebrew-hhvm icon indicating copy to clipboard operation
homebrew-hhvm copied to clipboard

Brew upgrade leads to confusing hhvm state

Open bigfootjon opened this issue 4 years ago • 4 comments

It would be nice if hhvm and hhvm-x.x were separate packages instead of aliasing hhvm to the latest version, as this alias breaks when homebrew is upgraded.

For example:

  • brew install hhvm installs hhvm-4.61
  • Wait for hhvm 4.62 to be released
  • brew upgrade
  • hhvm --version indicates that I'm still on 4.61
  • ???

It's especially confusing to try and rectify the situation after a brew upgrade as brew uninstall hhvm complains that I don't have hhvm-4.62 installed which is... correct but not a helpful error message.

My workaround is to brew uninstall hhvm && brew upgrade && brew install hhvm which is annoying and takes more time. If I forget to uninstall before upgrading it's brew uninstall hhvm-4.61 && brew install hhvm. Since HHVM has such a frequent release cadence trying to keep up-to-date with homebrew in this way is a bit tiresome.

bigfootjon avatar Jun 19 '20 14:06 bigfootjon

This sounds reasonable to me and probably a simple change (possibly just change ln -sf ... to cp ... in the build script?) but I don't know a lot about Homebrew, @fredemmott what do you think?

jjergus avatar Jun 25 '20 20:06 jjergus

This is a good change; I didn't think it was that trivial because of $problems_we've_already_solved_to_make_the_symlink_updating_working

fredemmott avatar Jun 25 '20 20:06 fredemmott

oh, this might need a rebuild actually - the package name is part of the binary package filename

fredemmott avatar Jun 25 '20 20:06 fredemmott

Yeah, there's a bunch of metadata, we can't just re-use the existing build artifact

fredemmott avatar Jun 25 '20 21:06 fredemmott