This has been a nightmare in terms of the complexity to our dependency
system and the whack-a-mole required on bugs. If a Requirement resolves
to a Formula it should just use `depends_on "formula"` instead. This
matches the effective behaviour all users of bottles (the vast majority
of users and installs) and what we're doing in Homebrew/homebrew-core.
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. :/