-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for build from source #2919
Add check for build from source #2919
Conversation
I notice that |
|
It has been unsupported for a while (indeed, years). I wasn't aware of this myself until I opened an issue, so I am trying to ensure that other people don't go down a rat hole trying to diagnose something when it's an unsupported path to begin with. |
It doesn't say there that it's unsupported though. It just says it's intended for homebrew developers. I don't see the benefit of this. |
It also says If a user is going to be told to not waste time opening a ticket if they encounter errors as a result of setting it - my feeling is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR @baughj. This is something we should have done a while ago and your PR helpfully removes the item from my TODO list I added today to add it!
@@ -89,16 +89,11 @@ following conditions: | |||
will use a bottled version of the formula, but | |||
`brew install <formula> --enable-bar` will trigger a source build. | |||
* The `--build-from-source` option is invoked. | |||
* The environment variable `HOMEBREW_BUILD_FROM_SOURCE` is set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave this line as-is because it's factually correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding something that this is not intended for general use? Like (for developers only)
.
* The machine is not running a supported version of macOS as all | ||
bottled builds are generated only for supported macOS versions. | ||
* Homebrew is installed to a prefix other than the standard | ||
`/usr/local` (although some bottles support this). | ||
|
||
In order to completely disable bottled builds, simply add a value for | ||
the environment variable `HOMEBREW_BUILD_FROM_SOURCE` to | ||
your profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 on deleting this.
Library/Homebrew/diagnostic.rb
Outdated
@@ -98,6 +98,17 @@ def check_for_installed_developer_tools | |||
EOS | |||
end | |||
|
|||
def check_build_from_source | |||
return unless ENV.key?("HOMEBREW_BUILD_FROM_SOURCE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return unless ENV["HOMEBREW_BUILD_FROM_SOURCE"]
is our usual style here.
OK, changed as requested and updated language to |
Thanks for your first contribution to Homebrew/brew, @baughj! Without people like you submitting PRs we couldn't run this project. You rock! |
brew tests
with your changes locally?This is a simple change to add a warning to
brew doctor
if the unsupported environment variableHOMEBREW_BUILD_FROM_SOURCE
is set. I believe they would be beneficial for olderbrew
users (myself included) that have this set (I wasn't aware it was unsupported until recently).