Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
Rather than just checking if a requirement's dependency is installed or
not check if the requirement was actually satisfied by a particular
formula rather than e.g. just having a `default_formula` defined.
We now have "magic" to automatically handle `brew cask` and `brew bundle`
calls without needing to tap those taps manually beforehand. Let's reflect that
in this wording for consistency.
Closes#427.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This means that dependencies can be merged but still maintain all
their option names.
ClosesHomebrew/homebrew#46916.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This is currently still very messy and we probably want to work out the
best way to declare what parts of our DSL/what files are "public".
Still, even if this is a WIP I'd rather get something committed sooner
rather than later and start iterating on this as a replacement for
`example_formula.rb` and the formula cookbook.
To test:
```bash
cd $(brew --prefix)/Library/Homebrew && \
rdoc formula.rb requirement.rb utils.rb &&\
open doc/index.html
```
ClosesHomebrew/homebrew#32470.
There is a nasty circular dependency here:
formula.rb
requirement.rb
extend/ENV.rb
extend/ENV/shared.rb
formula.rb
Probably the information that the build environment needs from formula
should be passed in at runtime, but that seems hard and I really just
want to be able to run the tests with warnings turned on. :/
The implementation of #eql? and #hash should ensure that if a.eql?(b),
then a.hash == b.hash, but #eql? itself should not *depend* on #hash.
For example, given
class Thingy
def eql?
instance_of?(other.class) && hash == other.hash
end
def hash
[name, *tags].hash
end
end
if #hash produces a collision for different values of [name, *tags], two
Thingy objects will appear to be eql?, even though this is not the case.
Instead, #eql? should depend on the equality of name and tags directly.
This hack was necessary since requirements were not checked again
in the forked build process, but now they are, and calling it again
after the build environment has been set up can produce incorrect
results. In fact, if it happens to return false the second time,
the env modification will be skipped altogether.