Merge pull request #17501 from Homebrew/portable-ruby-3.3.3

Portable Ruby 3.3.3
This commit is contained in:
Bo Anderson 2024-06-14 04:34:01 +01:00 committed by GitHub
commit 24f74c0528
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 22 additions and 23 deletions

View File

@ -1 +1 @@
3.3.2
3.3.3

View File

@ -197,7 +197,7 @@ DEPENDENCIES
yard-sorbet
RUBY VERSION
ruby 3.3.2p78
ruby 3.3.3p89
BUNDLED WITH
2.5.9
2.5.11

View File

@ -21,19 +21,19 @@ set_ruby_variables() {
# use a x86_64 Portable Ruby.
[[ "${VENDOR_PHYSICAL_PROCESSOR}" == "arm64" && "${HOMEBREW_PREFIX}" == "/usr/local" ]]
then
ruby_FILENAME="portable-ruby-3.3.2.el_capitan.bottle.tar.gz"
ruby_SHA="5c86a23e0e3caee1a4cfd958ed7d50a38e752ebaf2e7c5717e5c8eabaa6e9f12"
ruby_FILENAME="portable-ruby-3.3.3.el_capitan.bottle.tar.gz"
ruby_SHA="a5ef040e054444a0eb2cbcc1032fed14702dfbe2e55b25e609f3ce643f23c4ee"
elif [[ "${VENDOR_PHYSICAL_PROCESSOR}" == "arm64" ]]
then
ruby_FILENAME="portable-ruby-3.3.2.arm64_big_sur.bottle.tar.gz"
ruby_SHA="bbb73a9d86fa37128c54c74b020096a646c46c525fd5eb0c4a2467551fb2d377"
ruby_FILENAME="portable-ruby-3.3.3.arm64_big_sur.bottle.tar.gz"
ruby_SHA="49847c7a13f7094b211f6d0025900dd23716be07dac894a3d6941d7696296306"
fi
elif [[ -n "${HOMEBREW_LINUX}" ]]
then
case "${VENDOR_PROCESSOR}" in
x86_64)
ruby_FILENAME="portable-ruby-3.3.2.x86_64_linux.bottle.tar.gz"
ruby_SHA="dd3cffcc524de404e87bef92d89f3694a9ef13f2586a6dce4807456f1b30c7b0"
ruby_FILENAME="portable-ruby-3.3.3.x86_64_linux.bottle.tar.gz"
ruby_SHA="40a1dbc25bb1a8bbdf0bba53d3f16c45416be12d4c6d48b4530f90b2a77d64ce"
;;
*) ;;
esac

View File

@ -29,6 +29,7 @@ $LOAD_PATH.reject! { |path| path.start_with?(RbConfig::CONFIG["sitedir"]) }
require "pathname"
dir = __dir__ || raise("__dir__ is not defined")
HOMEBREW_LIBRARY_PATH = Pathname(dir).parent.realpath.freeze
HOMEBREW_PORTABLE_RUBY = Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/").freeze
require_relative "../utils/gems"
Homebrew.setup_gem_environment!(setup_path: false)
@ -39,14 +40,6 @@ if !gems_vendored && !ENV["HOMEBREW_SKIP_INITIAL_GEM_INSTALL"]
ENV["HOMEBREW_SKIP_INITIAL_GEM_INSTALL"] = "1"
end
if Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/")
ruby_version = RbConfig::CONFIG["ruby_version"]
ruby_path = "#{RbConfig::CONFIG["rubylibprefix"]}/gems/#{ruby_version}"
$LOAD_PATH.unshift "#{ruby_path}/extensions/#{Gem::Platform.local}/#{ruby_version}-static/debug-1.9.1"
$LOAD_PATH.unshift "#{ruby_path}/gems/debug-1.9.1/lib"
end
unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)
# Insert the path after any existing Homebrew paths (e.g. those inserted by tests and parent processes)
last_homebrew_path_idx = $LOAD_PATH.rindex do |path|
@ -55,6 +48,7 @@ unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)
$LOAD_PATH.insert(last_homebrew_path_idx + 1, HOMEBREW_LIBRARY_PATH.to_s)
end
require_relative "../vendor/bundle/bundler/setup"
require "portable_ruby_gems" if HOMEBREW_PORTABLE_RUBY
$LOAD_PATH.unshift "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/" \
"bundler-#{Homebrew::HOMEBREW_BUNDLER_VERSION}/lib"
$LOAD_PATH.uniq!

View File

@ -14,7 +14,7 @@ if homebrew_bootsnap_enabled
begin
require "bootsnap"
rescue LoadError
raise if ENV["HOMEBREW_BOOTSNAP_RETRY"]
raise if ENV["HOMEBREW_BOOTSNAP_RETRY"] || HOMEBREW_PORTABLE_RUBY
Homebrew.install_bundler_gems!(groups: ["bootsnap"], only_warn_on_failure: true)

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
require "rubygems"
require "bundler"
require "yaml"
RSpec.describe "Tapioca Config", type: :system do
@ -8,7 +8,11 @@ RSpec.describe "Tapioca Config", type: :system do
it "only excludes dependencies" do
exclusions = config.dig("gem", "exclude")
dependencies = Gem::Specification.all.map(&:name)
dependencies = Bundler::Definition.build(
HOMEBREW_LIBRARY_PATH/"Gemfile",
HOMEBREW_LIBRARY_PATH/"Gemfile.lock",
false,
).resolve.names
expect(exclusions - dependencies).to be_empty
end
end

View File

@ -10,7 +10,7 @@ require "English"
module Homebrew
# Keep in sync with the `Gemfile.lock`'s BUNDLED WITH.
# After updating this, run `brew vendor-gems --update=--bundler`.
HOMEBREW_BUNDLER_VERSION = "2.5.9"
HOMEBREW_BUNDLER_VERSION = "2.5.11"
# Bump this whenever a committed vendored gem is later added to or exclusion removed from gitignore.
# This will trigger it to reinstall properly if `brew install-bundler-gems` needs it.
@ -241,6 +241,7 @@ module Homebrew
# Combine the passed groups with the ones stored in settings.
groups |= (user_gem_groups & valid_gem_groups)
groups.delete("bootsnap") if HOMEBREW_PORTABLE_RUBY
groups.sort!
if (homebrew_bundle_user_cache = ENV.fetch("HOMEBREW_BUNDLE_USER_CACHE", nil))

View File

@ -1 +1 @@
3.3.2
3.3.3

View File

@ -1 +1 @@
3.3.2
3.3.3