Build options are immutable #16679

Sharpie opened this Issue Dec 20, 2012 · 3 comments


None yet
2 participants

Sharpie commented Dec 20, 2012

The BuildOptions object is instantiated once and then shared by every Formula object that gets created. This is troublesome when upgrading because there is no way to modify ARGV by temporarily loading options from a prior install receipt so that f.recursive_deps will properly return the dependencies of a formula.


jacknagel commented Dec 20, 2012

This is addressed indirectly by #14456; dependencies should no longer be declared using language-level conditionals, but rather via metadata that is examined during expansion in the installer. I've eliminated the ad-hoc dependency expansion in upgrade and moved it back into the installer.

Now that I finally have some free time over the holidays, I intend to complete this work.


Sharpie commented Dec 20, 2012

Perfect. Thanks tackling this one Jack!


jacknagel commented Jan 26, 2013

#14456 is merged. Dependencies declared with :optional and :recommended now generate options, eliminating the need for depends_on :foo if build.include? "with-foo" style declarations.

This doesn't cover all use cases (for example, an option that includes more than one dependency still requires real Ruby conditionals) but more work will be done to clean this up, e.g. #14315.

jacknagel closed this Jan 26, 2013

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.