-
Notifications
You must be signed in to change notification settings - Fork 373
Do depexts status check at opam update time #6489
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
base: master
Are you sure you want to change the base?
Conversation
a9ed214
to
6be401b
Compare
dac6fd8
to
4af5735
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.
This is a first look, code only. I need to test and play with it to complete the review.
src/state/opamSwitchState.ml
Outdated
st | ||
else | ||
{st with sys_packages = | ||
lazy ((OpamPackage.Map.union (fun x _ -> x) |
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.
lazy ((OpamPackage.Map.union (fun x _ -> x)
Why you take the first element, the one that is already in sys_package instead of updating with the new status ?
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.
If you remember, It did matter at some point which element to take but it was due to a buggy behaviour of the system overall that led to the fact that it had an importance.
Here, if the package is present in sys_package
map, means that its status have already been computed (with depexts_status_of_packages
by the way) and the status value is the same as from depexts_status_of_packages
called here L1286.
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.
This function is used in two cases : deps only newly created virtual packages and newly pinned packages. It is not an issue for the first case, but for the second case we want to retrieve the last information, no?
If this function is only meant to add new packages, the documentation and the implementation should be updated.
tests/reftests/depexts.test
Outdated
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> | ||
-> installed comp.1 | ||
Done. | ||
Fatal error: External dependency handling not supported for OS family 'unknown'. |
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.
error to investigate
c715f6a
to
48e64e4
Compare
48e64e4
to
9d59425
Compare
The fix is not good as in the case where there is no depexts possible, the previous version was returning an empty map and not supposing the all packages are available. We may want to add another variant to `available_packages` to handle the no depext case ?
9d59425
to
28b4831
Compare
Draft for #6461