This repository has been archived by the owner. It is now read-only.

Recommended and Optionals #1604

Closed
anagrius opened this Issue Jun 15, 2010 · 14 comments

Comments

Projects
None yet
7 participants
Contributor

anagrius commented Jun 15, 2010

Am I right in saying that specifying a dependency as recommended or optional has not effect? You can't specify which options you want to install a formula with.

I can see the problems such a feature would cause with the current naming convention of /. And also one would have to explicitly specify the variant on depends_on.

Are there any development on this topic? I know I could use it. Or is it anything you would like someone to work on?

Contributor

adamv commented Jun 15, 2010

Right, any deps that are specified will be installed, and if any dep installs fail, everything will fail.

Specifying which optional deps to compile will likely be part of a higher-level, better UI tool, which then calls brew underneath to install.

We're open to suggestions.

Contributor

anagrius commented Jun 16, 2010

Ok.

I updated the ffmpeg formula to reflect some of my ideas with a few extra examples.

Try and take a look at: http://gist.github.com/439951

This would retain backwards compatibility with current formulae.

This would of course also require the brew install to accept and option like:

brew install --features=a,b,c foo

Before I begin looking any further at it I would love some feedback. I might be completely far off with this?

Owner

MikeMcQuaid commented Jan 12, 2012

@adamv Was there any progress on this?

Owner

MikeMcQuaid commented Jan 19, 2012

@adamv @mxcl @mistydemeo @Sharpie @jacknagel I think we should remove recommended/optional or do something with them. The current in-between stage is rather confusing.

Contributor

jacknagel commented Jan 19, 2012

I always imagined that optional would do something like "if dep is installed, use it, otherwise ignore it", but I don't know that recommended could ever be anything other than an annotation.

Contributor

Sharpie commented Jan 19, 2012

I think we should remove them. It doesn't seem like they will be used when options are re-factored for inter-formula dependencies.

Owner

MikeMcQuaid commented Jan 19, 2012

Agreed @jacknagel about optional, that sounds reasonable. Even then I think that's handled enough already using options. Agreed with @Sharpie too. Will wait for a few more OKs and then might purge them.

Contributor

jacknagel commented Jan 20, 2012

That being said, I'm not married to :optional either. I'd be OK with removing it.

It doesn't seem like they will be used when options are re-factored for inter-formula dependencies.

Good point, :optional will probably be supplanted by more specific "this option requires this dep" type stuff.

Member

mxcl commented Jan 20, 2012

I started adding these annotations in the early days in case it would later become possible to make use of them. I don't see why there is need to remove them, at the very least it is still useful metadata for people reading the formula. And hopefully we can figure out how to make them more useful in general.

Member

mxcl commented Jan 20, 2012

Yes optional was meant to mean, if the install of the dep fails, you can still install this formula. Recommended was meant to allow the user to opt out if they like, because it is a good idea to have it, but the formula will still install without it.

Contributor

mistydemeo commented Jan 20, 2012

I can see :optional as being useful in formulae with very large numbers of requirements, e.g. ffmpeg, where providing the user with 10+ commandline switches would be overwhelming. That's more of an edge case than the norm.

Owner

MikeMcQuaid commented Jan 20, 2012

I think it's a bit confusing/messy to have them and not use them. Agreed about edge cases but I'd also personally rather install the minimum number of dependencies required, dunno about others. Won't remove them.

Contributor

adamv commented Jan 22, 2012

One way to use options (manually) is to install the ones you want by hand, then install the main formula using --ignore-dependencies. UI tooling can help with this.

Contributor

adamv commented Aug 9, 2012

Closing in favor of new work happening in #13923.

@adamv adamv closed this Aug 9, 2012

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.