-
Notifications
You must be signed in to change notification settings - Fork 348
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
Depext filter enhancement: resolve package variables #5455
base: master
Are you sure you want to change the base?
Conversation
In order to be able to resolve undefined variables at several stages (once switch_state loaded, on install, etc.)
They are lately used for resolving at install stage, for availability checkup, etc. permitting to evaluate on filter install status of a package or its version.
001da67
to
a312e7e
Compare
### OPAMVAR_os_family=dummy-success::0 opam install conf-os --show | ||
The following actions would be performed: | ||
=== install 2 packages | ||
- install conf-os 1 | ||
- install conf-os1 1 [required by conf-os] | ||
[WARNING] These additional system packages are required, but not available on your system: os1-depext |
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'm not sure to understand this test result. Why is this just a warning if the system package isn't available?
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.
It should be a simple message indeed, or an error, not a warning.
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.
In fact, here it's with --show
, it errors at install step.
### OPAMVAR_os_family=dummy-success::0 opam install conf-os | ||
The following actions will be performed: | ||
=== install 2 packages | ||
- install conf-os 1 | ||
- install conf-os1 1 [required by conf-os] | ||
[WARNING] These additional system packages are required, but not available on your system: os1-depext | ||
[ERROR] Some packages have missing dependencies after resolution: |
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.
Same sort of question than above here: why are we displaying the error so late?
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.
We check depext availability when we try to install once we have the solution. We resolve last filters (here conf-os1:installed
) with an environment that contains packages to install as installed.
- install conf-os1 1 [required by conf-os] | ||
[WARNING] These additional system packages are required, but not available on your system: os1-depext | ||
[ERROR] Some packages have missing dependencies after resolution: | ||
- conf-os.1: os1-depext |
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.
Shouldn't also say something about os2-depext
?
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.
As we resolve with the solution, conf-os1:installed
resolves to true while conf-os2
resolves to false, that's why we display only os1-depext
.
We can recheck availability at this stage, and print a message for os2-depext
.
I'm rather unconvinced by the solution and I'm still confused as to why this is necessary for Windows support.
Could describe what the problem it's trying to solve is? |
depexts:
filter can now handle package variables. They are stored and resolved on the go & gradually. On install, packages appearing in solution are considered as installed for resolving. Seedepexts.test
for examples.