Add argument --ignore-available-on to ignore availibility of specific packages - #6836
Conversation
kit-ty-kate
left a comment
There was a problem hiding this comment.
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.
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.
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! |
|
I've just run into another case (ocaml/opam-repository#30147) where this argument would have been very useful |
3e3cedd to
1aece0c
Compare
|
I squashed and renamed the commits to make them ready to merge (first force-push). Do they sound good to you? The second force-push is here to simply rebase on master and update the tests result. |
|
They do sound good to me. Thank you! |
1aece0c to
a530b68
Compare
github no longer show the first force push when there are done within a short period of time i guess
|
…VAILABLE environment variable
a530b68 to
d904e10
Compare
sigh... does it still show up in your email inbox at least? (not ideal so i'll have to think about a better solution for the future, but good to know for now) |
|
Yes, there are still separate emails in the thread |
|
Thanks a lot! |
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