From 22fb25d96d924e98ba7ae144e0483c9db9bc2a28 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 23 Feb 2021 09:35:21 +0000 Subject: [PATCH] Enable HOMEBREW_BOOTSNAP for developers - Enable it by default if you've run a developer command or set `HOMEBREW_DEVELOPER`. - Clarify the documentation that there's various configuration in which it doesn't work. I've rolled this out of most of GitHub's developers with no ill effects and we've enabled it in both CI and for various maintainers so it feels appropriate to have a bigger rollout. --- Library/Homebrew/brew.sh | 5 +++++ Library/Homebrew/env_config.rb | 5 +++-- docs/Manpage.md | 2 +- manpages/brew.1 | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 9c4326f309..9f846880d3 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -584,6 +584,11 @@ then export HOMEBREW_BOTTLE_DOMAIN="$HOMEBREW_BOTTLE_DEFAULT_DOMAIN" fi +if [[ -n "$HOMEBREW_DEVELOPER" || -n "$HOMEBREW_DEV_CMD_RUN" ]] +then + export HOMEBREW_BOOTSNAP="1" +fi + export HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/brew" if [[ -z "$HOMEBREW_BREW_GIT_REMOTE" ]] then diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb index 8438e1aec4..f3bcb87bc4 100644 --- a/Library/Homebrew/env_config.rb +++ b/Library/Homebrew/env_config.rb @@ -40,8 +40,9 @@ module Homebrew description: "Use this username when accessing the Bintray API (where bottles are stored).", }, HOMEBREW_BOOTSNAP: { - description: "If set, use Bootsnap to speed up repeated `brew` calls. "\ - "A no-op when using Homebrew's vendored, relocatable Ruby on macOS (as it doesn't work).", + description: "If set, use Bootsnap to speed up repeated `brew` calls. " \ + "A no-op in various configurations where it doesn't work. " \ + "Enabled by default if HOMEBREW_DEVELOPER is set or a developer command has been run.", boolean: true, }, HOMEBREW_BOTTLE_DOMAIN: { diff --git a/docs/Manpage.md b/docs/Manpage.md index 95e9f04901..91f5dadb00 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1721,7 +1721,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
Use this username when accessing the Bintray API (where bottles are stored). - `HOMEBREW_BOOTSNAP` -
If set, use Bootsnap to speed up repeated `brew` calls. A no-op when using Homebrew's vendored, relocatable Ruby on macOS (as it doesn't work). +
If set, use Bootsnap to speed up repeated `brew` calls. A no-op in various configurations where it doesn't work. Enabled by default if HOMEBREW_DEVELOPER is set or a developer command has been run. - `HOMEBREW_BOTTLE_DOMAIN`
Use this URL as the download mirror for bottles. For example, `HOMEBREW_BOTTLE_DOMAIN=http://localhost:8080` will cause all bottles to download from the prefix `http://localhost:8080/`. diff --git a/manpages/brew.1 b/manpages/brew.1 index 733c78cc81..e7c9bd92d7 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -2398,7 +2398,7 @@ Use this username when accessing the Bintray API (where bottles are stored)\. \fBHOMEBREW_BOOTSNAP\fR . .br -If set, use Bootsnap to speed up repeated \fBbrew\fR calls\. A no\-op when using Homebrew\'s vendored, relocatable Ruby on macOS (as it doesn\'t work)\. +If set, use Bootsnap to speed up repeated \fBbrew\fR calls\. A no\-op in various configurations where it doesn\'t work\. Enabled by default if HOMEBREW_DEVELOPER is set or a developer command has been run\. . .TP \fBHOMEBREW_BOTTLE_DOMAIN\fR