OP’s Note: Since this question is more informal than what might be asked under the framework of Homebrew’s GitHub issue template, I posted it here first for either dismissal or further triage.
man brew, I just recently noticed that it states the following as part of its description of how to invoke
brew install under said
man page’s ‘COMMANDS’ section:
⋮ If --build-from-source (or -s) is passed, compile the specified formula from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available. ⋮
Though this reflects the fact that Homebrew is either in the process of transitioning from being a from-source package manager to being a binary package manager or has already completed that transition, it may not, however, necessarily be the behavior that this individuals who, like myself, would like to continue using Homebrew as a from-source package manager, for better or for worse. (Discussing the benefits and drawbacks of such an approach within this Discourse thread seems like it would introduce extreme bloat to it, so I feel it would be best if that could be deferred to a future thread — here on Discourse or elsewhere — for now.)
man page does, I should note, continue on by describing a workaround that end users may rely upon to circumvent this…interesting behavior:
⋮ If HOMEBREW_BUILD_FROM_SOURCE is set, regardless of whether --build-from-source was passed, then both formula and the dependencies installed as part of this process are built from source even if bottles are available. ⋮
Setting this environment variable would produce the desired behavior, but Homebrew’s
man page later states in its ‘ENVIRONMENT’ section that usage of it is meant to be developer-/maintainer-internal only, at least with regard to tap creators and bottle distributors:
⋮ HOMEBREW_BUILD_FROM_SOURCE If set, instructs Homebrew to compile from source even when a formula provides a bottle. This environment variable is intended for use by Homebrew developers. Please do not file issues if you encounter errors when using this environment variable. ⋮
Given all of this, might there be interest in making it so that
brew install can optionally pass
--build-from-source down to/through recursive invocations of either itself or related commands on members of a requested package’s dependency tree?