Skip to content

cask: merge multiple conflicts_with stanzas - #23506

Merged
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
hyuraku:hyuraku/cask-conflicts-with-merge
Aug 12, 2026
Merged

cask: merge multiple conflicts_with stanzas#23506
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
hyuraku:hyuraku/cask-conflicts-with-merge

Conversation

@hyuraku

@hyuraku hyuraku commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

conflicts_with can only appear once per cask: a second top-level stanza raises, and one in an on_* block replaces the top-level one. So a cask can't conflict with one cask everywhere and another on one
OS only. Cask::DSL has a TODO asking to merge instead, and the Cask Cookbook already documents multiple occurrences as allowed.

Now each call merges into the previous ones as a set union, and the NoOverrides cop no longer flags conflicts_with.

No behavior change for existing casks: none of the 7,691 casks in homebrew-cask uses it more than once, and merging is idempotent so reloading gives the same result. Added a fixture cask, a DSL spec, and a NoOverrides cop spec.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

AI (Claude Code) assisted in writing the code and tests.
I reviewed the change and ran brew lgtm locally

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @hyuraku!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 12, 2026
Merged via the queue into Homebrew:main with commit 7af3464 Aug 12, 2026
45 checks passed
@hyuraku
hyuraku deleted the hyuraku/cask-conflicts-with-merge branch August 12, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants