Skip to content
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

opam switch add-invariant #6269

Open
kit-ty-kate opened this issue Oct 25, 2024 · 0 comments
Open

opam switch add-invariant #6269

kit-ty-kate opened this issue Oct 25, 2024 · 0 comments

Comments

@kit-ty-kate
Copy link
Member

In this discuss post i realized that the current way to add a package or a formula to the current invariant isn't really straightforward:

opam switch set-invariant --formula "$(opam switch invariant | sed 's/]/ \"<pkg>\"]/')"

To remedy this i propose adding the following sub-command:

opam switch add-invariant

which works the exact same way as opam switch set-invariant but instead of setting the invariant it's adding to the invariant (concatenate the two formula)

One can also think of the reverse: opam switch remove-invariant which would scan the whole formula for the given formula or package and remove the matching subformula or package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant