mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Remove non-Portable Ruby bootsnap support
This commit is contained in:
parent
907f54af88
commit
2b454328ca
@ -23,9 +23,6 @@ end
|
||||
group :ast, optional: true do
|
||||
gem "rubocop-ast", require: false
|
||||
end
|
||||
group :bootsnap, optional: true do
|
||||
gem "bootsnap", require: false
|
||||
end
|
||||
group :formula_test, optional: true do
|
||||
gem "minitest", require: false
|
||||
end
|
||||
|
@ -6,8 +6,6 @@ GEM
|
||||
ast (2.4.2)
|
||||
bigdecimal (3.1.8)
|
||||
bindata (2.5.0)
|
||||
bootsnap (1.18.3)
|
||||
msgpack (~> 1.2)
|
||||
coderay (1.1.3)
|
||||
commander (5.0.0)
|
||||
highline (~> 3.0.0)
|
||||
@ -29,7 +27,6 @@ GEM
|
||||
language_server-protocol (3.17.0.3)
|
||||
method_source (1.1.0)
|
||||
minitest (5.23.1)
|
||||
msgpack (1.7.2)
|
||||
netrc (0.11.0)
|
||||
parallel (1.25.1)
|
||||
parallel_tests (4.7.1)
|
||||
@ -158,7 +155,6 @@ PLATFORMS
|
||||
|
||||
DEPENDENCIES
|
||||
addressable
|
||||
bootsnap
|
||||
json_schemer
|
||||
kramdown
|
||||
method_source
|
||||
|
@ -69,7 +69,7 @@ module Homebrew
|
||||
},
|
||||
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).",
|
||||
"A no-op on Linux when not using Homebrew's vendored, relocatable Ruby.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_BOTTLE_DOMAIN: {
|
||||
|
@ -4,7 +4,6 @@ gem:
|
||||
exclude:
|
||||
# These conflict with the rbi files provided by sorbet:
|
||||
- json
|
||||
- msgpack
|
||||
# These aren't needed:
|
||||
- coderay
|
||||
- commander
|
||||
|
@ -1,30 +1,13 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && !ENV["HOMEBREW_BOOTSNAP"].nil?
|
||||
|
||||
# we need some development tools to build bootsnap native code
|
||||
homebrew_bootsnap_enabled &&= if ENV["HOMEBREW_MACOS_VERSION"]
|
||||
File.directory?("/Applications/Xcode.app") || File.directory?("/Library/Developer/CommandLineTools")
|
||||
else
|
||||
File.executable?("/usr/bin/clang") || File.executable?("/usr/bin/gcc")
|
||||
end
|
||||
homebrew_bootsnap_enabled = HOMEBREW_USING_PORTABLE_RUBY &&
|
||||
ENV["HOMEBREW_NO_BOOTSNAP"].nil? &&
|
||||
!ENV["HOMEBREW_BOOTSNAP"].nil?
|
||||
|
||||
if homebrew_bootsnap_enabled
|
||||
begin
|
||||
require "bootsnap"
|
||||
rescue LoadError
|
||||
raise if ENV["HOMEBREW_BOOTSNAP_RETRY"] || HOMEBREW_USING_PORTABLE_RUBY
|
||||
|
||||
Homebrew.install_bundler_gems!(groups: ["bootsnap"], only_warn_on_failure: true)
|
||||
|
||||
ENV["HOMEBREW_BOOTSNAP_RETRY"] = "1"
|
||||
exec ENV.fetch("HOMEBREW_BREW_FILE"), *ARGV
|
||||
end
|
||||
|
||||
ENV.delete("HOMEBREW_BOOTSNAP_RETRY")
|
||||
|
||||
if defined?(Bootsnap)
|
||||
cache = ENV.fetch("HOMEBREW_CACHE", nil) || ENV.fetch("HOMEBREW_DEFAULT_CACHE", nil)
|
||||
raise "Needs HOMEBREW_CACHE or HOMEBREW_DEFAULT_CACHE!" if cache.nil? || cache.empty?
|
||||
|
||||
@ -43,7 +26,4 @@ if homebrew_bootsnap_enabled
|
||||
compile_cache_iseq: true,
|
||||
compile_cache_yaml: true,
|
||||
)
|
||||
else
|
||||
$stderr.puts "Error: HOMEBREW_BOOTSNAP could not `require \"bootsnap\"`!\n\n"
|
||||
end
|
||||
end
|
||||
|
@ -241,7 +241,6 @@ module Homebrew
|
||||
|
||||
# Combine the passed groups with the ones stored in settings.
|
||||
groups |= (user_gem_groups & valid_gem_groups)
|
||||
groups.delete("bootsnap") if HOMEBREW_USING_PORTABLE_RUBY
|
||||
groups.sort!
|
||||
|
||||
if (homebrew_bundle_user_cache = ENV.fetch("HOMEBREW_BUNDLE_USER_CACHE", nil))
|
||||
|
@ -3563,8 +3563,8 @@ command execution e.g. `$(cat file)`.
|
||||
|
||||
`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 on Linux when
|
||||
not using Homebrew's vendored, relocatable Ruby.
|
||||
|
||||
`HOMEBREW_BOTTLE_DOMAIN`
|
||||
|
||||
|
@ -2285,7 +2285,7 @@ Use this as the \fBbat\fP theme for syntax highlighting\.
|
||||
.RE
|
||||
.TP
|
||||
\fBHOMEBREW_BOOTSNAP\fP
|
||||
If set, use Bootsnap to speed up repeated \fBbrew\fP calls\. A no\-op when using Homebrew\[u2019]s vendored, relocatable Ruby on macOS (as it doesn\[u2019]t work)\.
|
||||
If set, use Bootsnap to speed up repeated \fBbrew\fP calls\. A no\-op on Linux when not using Homebrew\[u2019]s vendored, relocatable Ruby\.
|
||||
.TP
|
||||
\fBHOMEBREW_BOTTLE_DOMAIN\fP
|
||||
Use this URL as the download mirror for bottles\. If bottles at that URL are temporarily unavailable, the default bottle domain will be used as a fallback mirror\. For example, \fBHOMEBREW_BOTTLE_DOMAIN=http://localhost:8080\fP will cause all bottles to download from the prefix \fBhttp://localhost:8080/\fP\&\. If bottles are not available at \fBHOMEBREW_BOTTLE_DOMAIN\fP they will be downloaded from the default bottle domain\.
|
||||
|
Loading…
x
Reference in New Issue
Block a user