Skip to content
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

opam install --deps-only ./<pkg>.opam modifies permanently the definition of <pkg> if it is already installed #6101

Open
kit-ty-kate opened this issue Jul 17, 2024 · 1 comment

Comments

@kit-ty-kate
Copy link
Member

While testing a fix for #5567 i noticed that the following test:

opam pin remove -y test
printf 'opam-version: "2.0"\n' > ./test.opam
opam install -y ./test.opam
printf 'opam-version: "2.0"\ndepends: "core"\n' > ./test.opam
opam install --no ./test.opam --debug-level=3 --deps-only

would modify the pinned test package in a way where it now show core as part of the dependencies instead of what was there before.

I think it is relatively accepted that --deps-only should not do anything apart from installing the dependencies of a given package and thus this behaviour shouldn't happen

@kit-ty-kate
Copy link
Member Author

Looking at the code, i suspect this also happens with opam upgrade --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant