-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Implement conflicts_with :formula
for casks
#16374
Conversation
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.
Thanks for the PR @Rylan12!
My reading of that conversation was that there might be interest in a more advanced type of conflict where instead of refusing to install, we simply don't link the conflicting files. For now, my implementation works the same way inter-casks and inter-formulae conflicts work (meaning it simply refuses to install).
Yes. conflicts_with
is a terrible formula DSL. If I could: I'd get rid of it entirely except for somehow miraculous cases where two keg-only formulae conflict.
Instead: we should have the idea of a linking conflict (which we could/should bring to formualae too): these two packages cannot both be linked at the same time so when you install the latter: don't try to link it, output a warning on how to "flip" the linking and ensure that an upgrade of either doesn't cause the same issue again.
Gotcha, I think that makes sense. Is that something we'd want in addition to |
Personally: I don't think so. I think if there's any It may be less confusing for end-users to move to a new DSL entirely, though, like I'm open to doing things either ways. The only bits I feel strongly about:
Thanks again @Rylan12! |
I'd love to get more maintainer opinions on this. My current thinking is that sticking with |
I'm not super familiar with the linker code but after reading this thread it seems like 1) adding The original issue has been open since 2015 so this doesn't seem super urgent. Maybe we could wait a bit after opening the |
I do feel very strongly that:
What is completely reasonable to me and not-at-all-blocking:
I hope that helps! Thanks again @Rylan12 and sorry you've stumbled onto a contentious topic 😅 |
Sorry, I wasn't clear. I planned to close this PR anyway but I wanted to wait to do so to see if anyone had any more thoughts. It sounds like probably not, so I'm going to close it now. I'll open a new issue that people might be more likely to look at with some options |
@Rylan12 Ok, sorry and thanks! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Closes Homebrew/homebrew-cask#12822
This PR implements the
conflicts_with formula: "..."
DSL for casks by extracting the logic for handling formula conflicts and applying it to casks as well.Interestingly, after I started working on this, I noticed some discussion in #16309 about this kind of thing. My reading of that conversation was that there might be interest in a more advanced type of conflict where instead of refusing to install, we simply don't link the conflicting files. For now, my implementation works the same way inter-casks and inter-formulae conflicts work (meaning it simply refuses to install). I figured I'd open this PR so we can discuss what the best way to handle this is.
CC @MikeMcQuaid, @cho-m, and @Homebrew/cask