When an exception is raised in the build process, it is marshaled and
sent to the main process over a pipe. The marshaled exception has
a reference to the formula, so the formula and all objects it references
are marshaled as well.
Previously this did not include dependencies, as they were stored only
on the class and not referenced by an instance variable. However, now
they are stored on SoftwareSpec instances, to which the formula *does*
have a direct reference, so they must be marshalable.
Currently Upgrade prints out:
"Upgrading 0 outdated package, with result:"
This change makes it print:
"Upgrading 0 outdated packages, with result:"
correctly pluralizing "packages".
ClosesHomebrew/homebrew#22854.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
When DownloadStrategyDetector.detect is given a second argument, and
that argument is not a symbol or an AbstractDownloadStrategy subclass,
it is silently ignored, and we fall back to guessing the strategy based
on the URL.
This means I can do
url 'http://foo.com/bar.tar.gz', :using => Class.new
and things will appear to work, even though I have clearly passed an
invalid value for :using.
A more useful behavior is to raise an exception for unknown strategy
specifications.
Our wrapper always runs the real xcrun at least once, to try to find
the path of the tool being run, but this meant that we were generating
a huge number of error messages on every cc invocaton. Mostly this was
annoying but harmless, but notably it managed to break the compilation
of go.
Previously, instructing Homebrew that all dependencies should be built
universal could be accomplished by redefining BuildOptions#universal? in
the class body:
def build.universal?
true
end
However, the build object is no longer shared by all specs, so this is
insufficient. Instead, a new DSL method, "require_universal_deps", can
be used.
This feature is almost exclusively for wine, which requires universal
deps but does not itself have a universal option, since it is always
built 32-bit.
If @compiler isn't set/checked by ENV.compiler and the ENV.clang/etc.
methods, ENV.compiler may return unexpected results after fails_with
picks a fallback compiler.
See Homebrew/homebrew#22674.