diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 338a7d52483c72..fb80471e8b983f 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -55,11 +55,11 @@ jobs: with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github } # Set fetch-depth: 10 so that Launchable can receive commits information. - { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } } - - name: 'clang 18 LTO' + - name: 'clang 22 LTO' uses: './.github/actions/compilers' with: - tag: clang-18 - with_gcc: 'clang-18 -flto=auto' + tag: clang-22 + with_gcc: 'clang-22 -flto=auto' optflags: '-O2' enable_shared: false timeout-minutes: 30 @@ -107,6 +107,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github } - { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } } + - { uses: './.github/actions/compilers', name: 'clang 23', with: { tag: 'clang-23' }, timeout-minutes: 5 } - { uses: './.github/actions/compilers', name: 'clang 22', with: { tag: 'clang-22' }, timeout-minutes: 5 } - { uses: './.github/actions/compilers', name: 'clang 21', with: { tag: 'clang-21' }, timeout-minutes: 5 } - { uses: './.github/actions/compilers', name: 'clang 20', with: { tag: 'clang-20' }, timeout-minutes: 5 } diff --git a/lib/bundler.rb b/lib/bundler.rb index 51ea3beeb0f70a..26e946e0598154 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -172,7 +172,7 @@ def auto_switch self_manager.restart_with_locked_bundler_if_needed end - # Automatically install dependencies if settings[:auto_install] exists. + # Automatically install dependencies if settings[:auto_install] exists. # This is set through config cmd `bundle config set --global auto_install 1`. # # Note that this method `nil`s out the global Definition object, so it diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb index 6b21ff1b953303..e6e078dce40680 100644 --- a/lib/rubygems/package.rb +++ b/lib/rubygems/package.rb @@ -532,7 +532,7 @@ def normalize_path(pathname) # :nodoc: ## # Loads a Gem::Specification from the TarEntry +entry+ - def load_spec(entry) # :nodoc: + def load_spec_from_metadata(entry) # :nodoc: limit = 10 * 1024 * 1024 case entry.full_name when "metadata" then @@ -678,12 +678,7 @@ def verify_entry(entry) digest entry end - case file_name - when "metadata", "metadata.gz" then - load_spec entry - when "data.tar.gz" then - verify_gz entry - end + load_spec_from_metadata entry rescue StandardError warn "Exception while verifying #{@gem.path}" raise @@ -711,18 +706,6 @@ def verify_files(gem) end end - ## - # Verifies that +entry+ is a valid gzipped file. - - def verify_gz(entry) # :nodoc: - Zlib::GzipReader.wrap entry do |gzio| - # TODO: read into a buffer once zlib supports it - gzio.read 16_384 until gzio.eof? # gzip checksum verification - end - rescue Zlib::GzipFile::Error => e - raise Gem::Package::FormatError.new(e.message, entry.full_name) - end - if RUBY_ENGINE == "truffleruby" def copy_stream(src, dst, size) # :nodoc: dst.write src.read(size) diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb index 48a5dba4aa9db8..81209388ae9783 100644 --- a/spec/bundler/commands/clean_spec.rb +++ b/spec/bundler/commands/clean_spec.rb @@ -913,12 +913,10 @@ def should_not_have_gems(*gems) # Simulate that the locked bundler version is installed in the bundle path # by creating the gem directory and gemspec (as would happen after bundle install with that version) Pathname(vendored_gems("cache/bundler-#{version}.gem")).tap do |path| - path.basename.mkpath FileUtils.touch(path) end FileUtils.touch(vendored_gems("gems/bundler-#{version}")) Pathname(vendored_gems("specifications/bundler-#{version}.gemspec")).tap do |path| - path.basename.mkpath path.write(<<~GEMSPEC) Gem::Specification.new do |s| s.name = "bundler" @@ -934,11 +932,5 @@ def should_not_have_gems(*gems) bundle :clean should_have_gems "bundler-#{version}" - ensure - ["bundler-#{version}.gem", "bundler-#{version}.gemspec"].each do |filename| - Pathname(vendored_gems(filename)).tap do |path| - FileUtils.rm_rf(path.basename) - end - end end end diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb index 2ad63acd03bb92..0c214a232b7693 100644 --- a/test/rubygems/test_gem_package.rb +++ b/test/rubygems/test_gem_package.rb @@ -858,7 +858,7 @@ def test_install_location_suffix "#{@destination} is not allowed", e.message) end - def test_load_spec + def test_load_spec_from_metadata entry = StringIO.new Gem::Util.gzip @spec.to_yaml def entry.full_name "metadata.gz" @@ -866,7 +866,7 @@ def entry.full_name package = Gem::Package.new "nonexistent.gem" - spec = package.load_spec entry + spec = package.load_spec_from_metadata entry assert_equal @spec, spec end