The BottleCollector collects bottle tags and sha1s, and allows tags
to be fetched using more advanced logic than just fetching identical
tags.
ClosesHomebrew/homebrew#23434.
The old version worked like this:
fails_with :gcc => '4.8.1'
That wasn't really flexible enough, and made it harder to distinguish
different releases in the same GCC series. Since no one was really
using it yet, this adjusts the syntax to be more similar to the
Apple compilers:
fails_with :gcc => '4.8' do
release '4.8.1'
end
Like with Apple compilers, omitting `release` blacklists the entire
series.
This also unifies the `build` and `version` attributes and accessors,
and exposes them under both names.
When decided what dependencies should be part of the build environment
(and have appropriate entries added to variables like PKG_CONFIG_PATH),
we select the entire dependency tree except for
(1) inactive optional and recommended deps (2) indirect build-time deps
(i.e., build-time deps of other deps)
There is a third category that sould be excluded: dependencies of direct
build-time deps. These are irrelevant to the build, and including them
can cause unexpected linkages.
Declarations of dependencies, options, and resources in the DSL only
apply to specs that have already been initialized. For example, given
this snippet:
url ...
sha1 ...
depends_on 'foo'
devel do
url ...
sha1 ...
end
The dependency 'foo' will be recorded for the stable spec, but not the
devel spec, since it was not initialized prior to the call to
depends_on.
While it is considered best practice to declare all specs (stable,
devel, head, and bottle) prior to other declarations, there is nothing
that enforces this ordering, so when it happens it can be confusing and
hard to debug.
To prevent this, we can initialize all specs up front. This comes with
a performance penalty for commands that load all formulae into memory,
but that is probably outweighed by what we gain in correctness.
FixesHomebrew/homebrew#23425.
Comparing two objects should not raise an exception, even if they have
different types.
The semantics of #== are now the same as #eql?, so make one an alias.
When subformulae are initialized without a name parameter, Homebrew
assigns the name "__UNKNOWN__". This may cause collisions in the cache.
Currently CurlDownloadStrategy and its descendants handles this by
extracting the basename form the URL and using that as the cached
filename. However, other strategies simply raise an exception.
We can improve the other strategies by URL-encoding the URL string and
using that as the cached directory name.
Note that this happens very rarely, especially now that resources (which
always have a name) are preferred to subformulae. The most common case
is a subformula that specifies a head download.
ClosesHomebrew/homebrew#22949.
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.