-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
depends_on :formula
should take install flags
#8784
Comments
Checking whether it was compiled with the relevant flags is simple enough; we'd just need to parse the output of A trickier question, I think, is how to support this in the DSL. At the moment, We could permit only one formula per depends_on :formula => 'mkvtoolnix'
depends_on :formula => 'ffmpeg',
:version => '>= 2.5.2',
:options => %w{ --with-faac --with-fdk-aac } This method seems the most straightforward and readable to me. It is also the most consistent with Homebrew's Alternatively, we could allow depends_on :formula => [
{ :name => 'mkvtoolnix' }, # or just 'mkvtoolnix'
{ :name => 'ffmpeg', :version => '>= 2.5.2', :options => %w{ --with-faac --with-fdk-aac } }
] ...or a hash of hashes... depends_on :formula => {
'mkvtoolnix' => {},
'ffmpeg' => { :version => '>= 2.5.2', :options => %w{ --with-faac --with-fdk-aac } }
} I find the latter two options pretty clunky and unattractive. Are there any other alternatives you guys can think of? This was just a quick brainstorm. |
I agree the first one looks better. We’ve never been shy about repeating stanzas ( |
Alright, so how about a stricter requirement, then? Each
This reduces complexity by allowing us to assume exactly one dependency per |
I also see no problem with that. Most casks have only one |
@jawshooah the purpose of defining DSL 1.0 (#4688) is to have a standard from which we will not remove anything. New functionality should be added in ways that add to the existing DSL, or leave the existing DSL unchanged. Also, please note that this issue has already been assigned. We use assignments as a way to avoid duplicating efforts. |
@rolandwalker Right, but I can't find anything in the roadmap or docs specifying that a And sorry about that, I didn't notice that @ndr-qef had already self-assigned this. |
We appreciate contributions. My self-assignment was largely meant as a warning not to start an implementation before I had the chance to comment, in the interest of avoiding preventable mistakes. First, as @rolandwalker noted, it is unadvisable to break forms defined in the DSL v1; any change should be incremental. There is room for argument, partly because With regard to syntax, we should avoid nested forms. @rolandwalker in particular expressed concern over “creeping braces”, as exemplified by More relevantly to the issue at hand, we cannot be cavalier about preexisting installations. Aborting is the most we can do if an installed formula fails to meet our requirements. Given that Homebrew formulae are latest-only, I would focus on supporting option flags, and postpone version boundaries. |
Closing in favour of #22825. |
Refs lisamelton/video-transcoding-scripts#8 (comment).
There is currently at least one case where it’d be useful (the referenced issue). Homebrew does it; could we perhaps leverage that?
Looking now at the relevant code. From what I gather, we’d need to both add the option to supply install flags and a way to check if the relevant formula was compiled with the relevant flags (since it currently only checks if it was installed at all).
The text was updated successfully, but these errors were encountered: