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

DSL: add depends_on stanza #4896

Merged
merged 1 commit into from
Jun 28, 2014

Conversation

rolandwalker
Copy link
Contributor

For forward-compatibility, intentionally undocumented. Currently
works only as a synonym: depends_on :formula substitutes for
depends_on_formula, which is intended to be removed.

However, this PR also provides additional depends_on keys for
future expansion of functionality:

  • :cask
  • :macos
  • :arch
  • :x11
  • :java

The symbol names were chosen to match those used in Homebrew Formulae.

References: #4688, #2001

@nanoxd
Copy link
Contributor

nanoxd commented Jun 14, 2014

I'm not sure if it was intended, but it's missing a test for raise CaskInvalidError.new(self.title, "'depends_on' stanza may only appear once") at least for the time being.

@rolandwalker
Copy link
Contributor Author

I intentionally left out that test, as it represents undesired behavior. My philosophy is that tests represent the spec.

In fact, if I knew Ruby testing frameworks better, I would have put in the exact opposite test, marked as "allowed to fail", and used that to track when the existing limitation gets fixed.

It's awesome to have your close review on these patches. I used Set here, per your advice earlier, and am about to revise the previous PRs to do the same. I was pleasantly surprised to find that the Set could be splatted naturally with attr_accessor *VALID_KEYS.

@rolandwalker
Copy link
Contributor Author

@radeksimko I stubbed depends_on :x11 here as promised in an earlier thread.

@rolandwalker rolandwalker mentioned this pull request Jun 18, 2014
For forward-compatibility, intentionally undocumented.  Currently
works only as a synonym: `depends_on :formula` substitutes for
`depends_on_formula`, which is intended to be removed.

However, this PR also provides additional `depends_on` keys for
future expansion of functionality:
 - `:cask`
 - `:macos`
 - `:arch`
 - `:x11`
 - `:java`

The symbol names were chosen to match those used in Homebrew Formulae.

References: Homebrew#4688, Homebrew#2001
rolandwalker added a commit that referenced this pull request Jun 28, 2014
@rolandwalker rolandwalker merged commit 99ba340 into Homebrew:master Jun 28, 2014
@rolandwalker rolandwalker deleted the add_depends_on_stanza branch June 28, 2014 14:19
rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this pull request Jul 29, 2014
Forgotten in Homebrew#4688, but should be considered part of Cask DSL 1.0.
A `depends_on` stanza is much less useful without the corresponding
`conflicts_with`.

References: Homebrew#4896
@rolandwalker rolandwalker mentioned this pull request Sep 11, 2014
9 tasks
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants