-
Notifications
You must be signed in to change notification settings - Fork 385
Add argument --ignore-available-on to ignore availibility of specific packages #6836
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
kit-ty-kate
left a comment
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 looks globally really good, thanks a lot. Modulo this single command i don't see anything wrong on first glance.
Do you have extra time to add some tests for this feature? If not we'll do it whenever we get around to properly review this.
If you do, the documentation can be found here: https://github.com/ocaml/opam/tree/master/tests/reftests#readme and all the commands that use build_options should probably be tested for completeness (e.g. install, reinstall, remove, upgrade)
|
@kit-ty-kate tests added! This also forced me to flesh out the other places that it is needed, and move the logic into a single
Edit: I moved the logic into |
kit-ty-kate
left a comment
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.
a couple of minor comments to remove now unused additions
|
Thinking a little bit more, i think the option might be better named @rjbou what do you think? |
|
I do not believe that the code you've flagged above is unused -- deleting it and chasing down the subsequent compiler errors ends up essentially reverting the PR.
Happy to go with whatever name is preferred |
mmh, that doesn't sound right. These 4 lines are all related to the parsing of the |
Indeed, that was the piece that was breaking everything if I let the compiler guide me (The ml/mli disagreement errors you get when dealing with both continuations-style functions and module includes are not something with which I am all that fluent). |
kit-ty-kate
left a comment
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 modulo some really minor stylistic choice (we generally have a 80 columns rule for new lines of code) and commit reorganization, that we can do ourselves just before merging by force-pushing.
I'll let @rjbou do a second review, but overall i believe this should be good to go in 2.6 whose first alpha is planned around February
|
Thanks for the pointers! |
This is a proposed new argument to resolve the feature request in #5283.
I've decided to make it a separate argument from the
--ignore-constraints-onargument mentioned there, but it's an easy modification if we'd prefer that argument to do double duty.As a minimum demonstration, here is me trying to install the
osx-plutilopam package, which is marked as only available on macos, on my ubuntu machine:I have thus far made exactly the set of modifications that seemed necessary to get this working and no more.
I suspect that there is at least a couple more places this information would need to be propagated to be 'feature complete', but I decided to pause here to kindly ask for feedback on the general approach before continuing.
Fixes #5283