This repository has been archived by the owner. It is now read-only.
Please sign in to comment.
FormulaInstaller: construct new ARGV from an Options collection
The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well.
- Loading branch information...
Showing with 112 additions and 28 deletions.
- +8 −8 Library/Homebrew/build_options.rb
- +1 −1 Library/Homebrew/dependencies.rb
- +1 −1 Library/Homebrew/formula.rb
- +14 −13 Library/Homebrew/formula_installer.rb
- +32 −2 Library/Homebrew/options.rb
- +2 −2 Library/Homebrew/tab.rb
- +1 −1 Library/Homebrew/test/test_build_options.rb
- +53 −0 Library/Homebrew/test/test_options.rb