-
Notifications
You must be signed in to change notification settings - Fork 359
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 "opam install --check" check if all dependencies are installed recursively #6122
Conversation
c5b2bf6
to
efa4c0b
Compare
efa4c0b
to
f98490d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm on the idea and its proper code.
I've added a test for basic cases for install check, like that we are sure that these changes don't change them. I don't know if it should be in this PR or #6121.
### opam install --fake a.3 | ||
The following actions will be faked: | ||
=== upgrade 1 package | ||
- upgrade a 1 to 3 | ||
=== install 1 package | ||
- install b 1 [required by a] | ||
|
||
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> | ||
Faking installation of b.1 | ||
Faking installation of a.3 | ||
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why faking the install ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no other reason other than the force of habit and just in case it makes it faster
f98490d
to
56e4dc0
Compare
56e4dc0
to
4e1df98
Compare
The benchmark failure is real and is caused by an infinit loop. I'll have a look |
75abbf1
to
868fad4
Compare
868fad4
to
e498c5f
Compare
e498c5f
to
d3dd124
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some test from an old branch that I have, and some format nitpicking. Feel free to squash if it's ok for you.
Otherwise, lgtm!
|
||
let assume_built_restrictions ?available_packages t atoms = | ||
let missing = check_installed ~build:false ~post:false t atoms in | ||
let missing = | ||
check_installed ~build:false ~post:false ~recursive:false t atoms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume built does not check recursively, is it to not change the known behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the previous behaviour of this function did not check recursively so the behaviour of assume-built
hasn't changed either
d3dd124
to
cdb37b1
Compare
…s dependencies recursively
…ons and post-dependencies
…availibility checking
…_constraint and atom
c67555b
to
b930ba8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #6097
Queued on top of #6121
Queued on #6123