From cb8e35f297d9ae44fa4d7899cb063033ba218f05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:38:37 +0000 Subject: [PATCH 1/5] build(deps-dev): bump bootsnap in /Library/Homebrew Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.16.0 to 1.17.0. - [Changelog](https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md) - [Commits](https://github.com/Shopify/bootsnap/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: bootsnap dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 59701e92b5..144424ba3e 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -11,7 +11,7 @@ GEM public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) bindata (2.4.15) - bootsnap (1.16.0) + bootsnap (1.17.0) msgpack (~> 1.2) byebug (11.1.3) coderay (1.1.3) From 0016bd08aff7bb7ea4a35e744748b1319b427825 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:42:30 +0000 Subject: [PATCH 2/5] brew vendor-gems: commit updates. --- Library/Homebrew/vendor/bundle/bundler/setup.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 0947c1a5fb..a09ea94f50 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -39,8 +39,8 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.4.15/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-22/#{Gem.extension_api_version}/msgpack-1.7.2") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/msgpack-1.7.2/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-22/#{Gem.extension_api_version}/bootsnap-1.16.0") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bootsnap-1.16.0/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-22/#{Gem.extension_api_version}/bootsnap-1.17.0") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bootsnap-1.17.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-22/#{Gem.extension_api_version}/byebug-11.1.3") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/byebug-11.1.3/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib") From 78fcf30d1a78a36f4e237e415a3f85499106ae2c Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:47:41 +0000 Subject: [PATCH 3/5] Update RBI files for bootsnap. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- .../{bootsnap@1.16.0.rbi => bootsnap@1.17.0.rbi} | 4 ++-- .../sorbet/rbi/hidden-definitions/hidden.rbi | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{bootsnap@1.16.0.rbi => bootsnap@1.17.0.rbi} (98%) diff --git a/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.16.0.rbi b/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi similarity index 98% rename from Library/Homebrew/sorbet/rbi/gems/bootsnap@1.16.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi index 01601c3fcc..ac7585225e 100644 --- a/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.16.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.17.0.rbi @@ -25,14 +25,12 @@ end module Bootsnap::CompileCache class << self - def permission_error(path); end def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil)); end def supported?; end end end class Bootsnap::CompileCache::Error < ::StandardError; end -class Bootsnap::CompileCache::PermissionError < ::Bootsnap::CompileCache::Error; end Bootsnap::CompileCache::UNCOMPILABLE = T.let(T.unsafe(nil), BasicObject) module Bootsnap::ExplicitRequire @@ -100,12 +98,14 @@ module Bootsnap::LoadPathCache::ChangeObserver::ArrayMixin def []=(*args, &block); end def append(*entries); end def clear(*args, &block); end + def clone; end def collect!(*args, &block); end def compact!(*args, &block); end def concat(entries); end def delete(*args, &block); end def delete_at(*args, &block); end def delete_if(*args, &block); end + def dup; end def fill(*args, &block); end def flatten!(*args, &block); end def insert(*args, &block); end diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 36c3bed68f..6a528c4106 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -125,6 +125,10 @@ module Bootsnap::LoadPathCache DLEXT2 = ::T.let(nil, ::T.untyped) end +class Bootsnap::LoadPathCache::Cache + TRUFFLERUBY_LIB_DIR_PREFIX = ::T.let(nil, ::T.untyped) +end + class BottleSpecification extend ::T::Private::Methods::MethodHooks extend ::T::Private::Methods::SingletonMethodHooks @@ -5565,6 +5569,8 @@ end class Net::HTTPRangeNotSatisfiable end +Net::HTTPRedirection::EXCEPTION_TYPE = Net::HTTPRetriableError + Net::HTTPRedirectionCode = Net::HTTPRedirection Net::HTTPRequestURITooLarge = Net::HTTPURITooLong @@ -5579,13 +5585,9 @@ Net::HTTPServerErrorCode = Net::HTTPServerError Net::HTTPSession = Net::HTTP -class Net::HTTPSuccess -end +Net::HTTPSuccess::EXCEPTION_TYPE = Net::HTTPError -Net::HTTPSuccessCode::EXCEPTION_TYPE = Net::HTTPError - -class Net::HTTPSuccess -end +Net::HTTPSuccessCode = Net::HTTPSuccess class Net::HTTPURITooLong HAS_BODY = ::T.let(nil, ::T.untyped) From 329f8c7ca32cb05e4bf95ff622c1df26d0bc37ba Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Mon, 30 Oct 2023 18:57:01 +0000 Subject: [PATCH 4/5] startup/bootsnap: slim load path cache --- Library/Homebrew/startup/bootsnap.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/Homebrew/startup/bootsnap.rb b/Library/Homebrew/startup/bootsnap.rb index 3bc34ea970..3015471322 100644 --- a/Library/Homebrew/startup/bootsnap.rb +++ b/Library/Homebrew/startup/bootsnap.rb @@ -32,8 +32,17 @@ if homebrew_bootsnap_enabled 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? + # We never do `require "vendor/bundle/ruby/..."` or `require "vendor/portable-ruby/..."`, + # so let's slim the cache a bit by excluding them. + # Note that gems within `bundle/ruby` will still be cached - these are when directory walking down from above. + ignore_directories = [ + (HOMEBREW_LIBRARY_PATH/"vendor/bundle/ruby").to_s, + (HOMEBREW_LIBRARY_PATH/"vendor/portable-ruby").to_s, + ] + Bootsnap.setup( cache_dir: cache, + ignore_directories: ignore_directories, load_path_cache: true, compile_cache_iseq: true, compile_cache_yaml: true, From 2aa12893b042d76982b5fba96f3a7f45dffd80e6 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Mon, 30 Oct 2023 18:57:50 +0000 Subject: [PATCH 5/5] Support Bootsnap in Ruby 3 --- .github/workflows/tests.yml | 1 - Library/Homebrew/startup/bootsnap.rb | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4831c60fc2..892ea9e94c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -326,7 +326,6 @@ jobs: if: matrix.ruby run: | echo "HOMEBREW_USE_RUBY_FROM_PATH=1" >> "${GITHUB_ENV}" - echo "HOMEBREW_BOOTSNAP=" >> "${GITHUB_ENV}" # Unsupported, for now rm -rf "${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew/vendor/portable-ruby" - run: brew config diff --git a/Library/Homebrew/startup/bootsnap.rb b/Library/Homebrew/startup/bootsnap.rb index 3015471322..b78fb8d317 100644 --- a/Library/Homebrew/startup/bootsnap.rb +++ b/Library/Homebrew/startup/bootsnap.rb @@ -3,9 +3,7 @@ # Disable Rails cops, as we haven't required active_support yet. # rubocop:disable Rails -homebrew_bootsnap_enabled = ENV["HOMEBREW_NO_BOOTSNAP"].nil? && - !ENV["HOMEBREW_BOOTSNAP"].nil? && - ENV["HOMEBREW_RUBY3"].nil? +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"]