Fix opam install --deps-only using the opam description of the wrong package in some cases#6544
Merged
kit-ty-kate merged 2 commits intoocaml:masterfrom Jun 17, 2025
Conversation
1747903 to
583f7b3
Compare
…ling the package given with --deps-only
…package in some cases
583f7b3 to
94b610f
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6535
#6530 fixed the issue in the solver but created a discrepancy between what the solver gives displays and what is actually going to be executed.
To fix this we simply move the bit that re-add the non-simulated opam definitions, up before any solver/actions, and after any code specific to
--deps-onlywhere we actually need those information.After careful review of the different usages of the autopin system, i think most other commands do not require fixes, at the exception of:
opam tree: opam tree <local dir/file> doesn't take into account the dependencies of the packages requested if a package of the same name is already installed #6543opam switch create --deps-onlybut i haven't managed to produce a test-case that show any issue yet. In any case i suspect this would be a very niche corner case if there is an issue there.