-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Unable to install formula with "outdated pinned dependency" #6103
Comments
This is intentional behaviour. |
I don't understand how breaking dependencies for dozens (if not hundreds) of installed softwares is considered intentional behavior. Is there a known solution to this issue outside homebrew? Because trying to install one new package triggering the reinstal of almost a hundred softwares and packages every time Readline updates is absurd. (This has been the only critical issue I have ever had with homebrew. Amazing software otherwise!) |
When you pin stuff, it is a little bit at your own risk. When we bump versions or make changes, our CI runs and we deliver a working version to our users. We have hundred of thousands of users that are fine with that setup. We ship versions we know are working correctly. As soon as you pin a package, the dependency tree is less consistent. Stuff may work, or may not work. We want to avoid that hundreds of issues are opened to fix exotic linking issues or whatnot. Remember that we are not paid to provide support, and quite understaffed. Our CI is also quite weak, and we can not test more than we actually do. "is absurd": it may be for you, but from our perspective, this is the right thing to do, for our own sanity, and quantity off support we can provide. So let us decide what is absurd :) |
That's all par for the course with most open source projects and does not solve the issue. Are people just (for scope to the original issue) uninstalling every version of ruby they have through rbenv/rvm every single time they go to run |
First off, @omnilord I did want to thank you for speaking up as another voice on this thread. After originally being turned down, I was pretty disheartened (to say the least), so having another person voice concerns with this does remove a bit of the imposter syndrome I did have when posting this originally. While I have some counter points to both you and @iMichka , I did want to take the time to send my gratitude your way. That all said, in response @iMichka :
I agree completely, and understand this is not something that even makes sense to try and test for. However, in addition to not only having my "outside of homebrew" items break ( A topical ExampleHowever, going to something I am slightly more familiar with, gem "pg" In a gem "pg", "~> 1.0" Or maybe something more strict that you would find in the Unfortunately that isn't the case, and the Homebrew formula equivalents (in this theoretical example) basically assume the "go BOOM!" scenario I described above if any pinning is present, and most formula are written in a way to have zero expectations with when dealing with the version (probably based on rational provided above). While I wouldn't use the language "absurd" based on your rational given above, I think the expectation of "always use the most recent package" just doesn't apply for most people working on legacy systems. Without any hard facts or going into much more detail, I don't think it is "absurd" to say is there are people who use In reference my originally issue with $ brew install --missing package1 package2 readline package3 Equivalent that is available in many other package managers. So Possible Solutions:I think a solution for the particular issue in question that I opened this up for would be simply allow installations with dependencies that are pinned. Currently "it is a little bit at your own risk" is not even possible, as That said, regarding the very real concern you brought up:
is completely valid and understandable. That said, I don't think it is justification enough to completely lock out users from using a feature. Off the top of my head, this is non-exhaustive list of ideas to help prevent the issues you have described, order by "easiest to implement" to "hardest":
I would be more than willing assist in any of the above (as this is an issue that directly affects me), but with the current stance of "This is intentional behaviour." being broadcast from maintainers, it is hard for me to justify implementing even a POC for any of the above. If that happens to change, feel free to reach out here and I would be happy to take a look at providing a couple of proposed solutions. -Nick |
@omnilord You can configure
Please adjust your tone in future, thanks.
@NickLaMuro My apologies for any resulting imposter syndrome, it was genuinely not my intention for my actions to result in that. Triaging issues on a project as active as Homebrew on top of a job and child means my answers are often not as helpful as I'd like them to be if I had more time.
Homebrew is a deliberately very different system to RubyGems and the two don't really bear comparison. Homebrew has always worked this way and we do provide ways of sitting on older versions and maintaining whatever versions you want in whatever configuration you want (e.g. see
Homebrew's system isn't "you must always use the most recent package" (to be a bit pedantic) because it doesn't silently
We are never going to do this because we know in many (maybe even most) cases it will install packages that are broken which will result in torrents of issues.
This still results in us getting all those issues and having to manually triage them with a small team of volunteers. Additionally, it's not always obvious a pinned package is involved until later in debugging.
Warnings that don't block user behaviour mostly end up unread.
This is logistically very difficult. I think at the root here is a misunderstanding of why Homebrew does what it does. When you The workaround close to what's suggested/desired here would be that we could output that you could If you're going to go down the route where whole parts of the dependency tree need to be built from source then you are better to follow the guidelines in https://docs.brew.sh/Versions and I've hopefully provided more explanation here to understand why things are the way they are and some possible workarounds you can use today. I don't expect this will satisfy your needs perfectly but I'm afraid you're asking for us to do something that seems simple but makes this package manager much harder to run so we're unwilling to do so. |
@NickLaMuro, oh man, good to know I'm not alone in coping with imposter syndrome! First, let me apologize for having a panic attack yesterday and sharing my frustration here. It's just usually Homebrew is the cure for--not the cause of--package problems, and trying to solve this issue with readline has been a source of major anxiety for me in the last couple of iterations because it has become an immediate and blocking impediment that I am unable to find a solution to on my own. Homebrew has been a stable problem-free solution to my package needs for almost 6 years. This is the first and only time I've ever had a problem.
As Nick said, there is some serious imposter syndrome on this one, especially now that you make it sound like the solution is utterly simple and that makes me feel like an incompetent fool. The problem may not be a resolution in Homebrew, but the obvious (even if incorrect) solution to breaks in software that were built against packages from Homebrew was to pin readline, which is a Homebrew action. The misconception is real, in that my interpretation of how For posterity and others who will run into this problem, where can we find the manual to read for configuring rbenv/ruby-build to not blow up when homebrew inevitably blows away an old version of readline if it's not pinned? |
I appreciate the apology, thanks.
I'm not sure as I'm not a |
Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?Note: The issues reported by
brew doctor
seemed benign and based on a bit of "puts
debugging", so I don't think they are related to the issue at hand, but that output andbrew config
are provided below for posterity.brew doctor
outputbrew config
outputWhat you were trying to do (and why)
Install the
h2o
package with a pinnedreadline
package (pinned to8.0.0
).Extra info/rational about pinning
readline
(aka: "the why")Steps below are going to recreate with
sphinx-doc
as it is a nested dependency from above, and makes for a smaller dependency stack to digest (also shows the issue isn't with a single formula).Dependency "graph" for
h2o
(down below for illustration):What happened (include command output)
brew
err'd out and said to "brew unpin readline
" and to reinstall, assphinx-doc
required the latest version to install properly:Command output
What you expected to happen
Install the package.
readline
should not require an update for this package to function.Specifically, it seems like check that causes the above error was added here: #864
Which was solving the inverse (almost) of what I am dealing with. In the case of the reported issue it is attempting to solve, the user bumped the pinned package in question, and then it was unable to find the path necessary when installing a dependent package that depended on the pinned one.
In my case, it seems like
homebrew
is looking for a different version then what I have pinned,8.0.0_1
versus8.0.0
respectively, and so this fails theFormula#installed?
check. In my case, I have8.0.0
pinned, and to my knowledege it hasn't been upgraded, and instead is looking for8.0.0_1
for some reason:$ brew info readline
I have some
puts
debugging prior to opening this issue, which I am providing the output to that below, along with the diff of the changes I made tobrew
:brew install sphinx-doc
(with debugging)git diff
ofHomebrew
dirMy guess (without knowing how the dependencies are determined prior to checking if they exist) is that
brew
is somehow determining thatreadline 8.0.0_1
is required for this install, when I already should have it satisfied withreadline 8.0.0
.My work around at the moment was to just
brew edit cmake
and remove thedepends_on "sphinx-doc"
line,brew install h2o
and then undo the change. Allows the reproduction steps to work, and me to continue on my way. I will attempt to figure out howHomebrew
determines the dependencies in the first place some other time, but wanted to open this to make the maintainers aware of the issue.Step-by-step reproduction instructions (by running
brew
commands)I will update these steps in the future with a more accurate
brew
SHA for the installation ofreadline
, but for the time being I am just leaving it as???
for step three...1c2fb33043
forhomebrew-core
$ brew install readline
(should install the8.0.0
version)$ brew pin readline
homebrew-core
.$ brew install sphinx-doc
💥Update: Looking at the history for
homebrew-core/Formula/readline.rb
, it looks like at ed947f87 it was updated to8.0.0_1
by the bot 10 days ago, and it was originally at8.0.0
at 1c2fb33043 (4 months ago). I updated the steps with the "theoretical steps" based on those commits, though I haven't reproduced them myself.The text was updated successfully, but these errors were encountered: