From 82b2542164c4922da98805cb72bf13325a5ac6d5 Mon Sep 17 00:00:00 2001 From: Test Test Date: Sat, 1 Aug 2026 16:15:21 -0400 Subject: [PATCH 01/10] Rebase spec performance fixes onto master This PR previously targeted v0.59; retargeting onto master. Squashed the fork's net contribution (previously spread across the branch's merge-heavy history against v0.59) into a single commit applied cleanly on top of current castwide/master, resolving the one real conflict in .github/workflows/plugins.yml (master's own bundler-cache: false vs. this fork's bundler-cache: true perf fix for run_solargraph_rails_specs). --- .github/workflows/plugins.yml | 2 +- .github/workflows/rspec.yml | 15 ++++++++++++++- .rubocop.yml | 5 +++++ lib/solargraph/api_map.rb | 7 +++++++ lib/solargraph/diagnostics/base.rb | 3 ++- lib/solargraph/diagnostics/type_check.rb | 4 ++-- spec/api_map_method_spec.rb | 12 ++++++++++-- .../message/extended/check_gem_version_spec.rb | 5 +++++ spec/library_spec.rb | 2 +- spec/pin/base_spec.rb | 10 ++++++++-- spec/pin/method_spec.rb | 4 +++- spec/position_spec.rb | 2 -- spec/rbs_map/conversions_spec.rb | 11 +++++++++-- spec/yard_map/mapper_spec.rb | 7 ------- 14 files changed, 67 insertions(+), 22 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 218f598df..cfed714ca 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -196,7 +196,7 @@ jobs: # solargraph-rails supports Ruby 3.0+ # This job uses 3.2 due to a problem compiling sqlite3 in earlier versions ruby-version: '3.2' - bundler-cache: false + bundler-cache: true # https://github.com/apiology/solargraph/actions/runs/19400815835/job/55508092473?pr=17 rubygems: latest bundler: latest diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index f75bbd15d..64dbdaf46 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -40,6 +40,10 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true + # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 + # + # match version in Gemfile.lock and use same version below + bundler: 2.5.23 - name: Set rbs version run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile # /home/runner/.rubies/ruby-head/lib/ruby/gems/3.5.0+2/gems/rbs-3.9.4/lib/rbs.rb:11: @@ -67,9 +71,18 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' + # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 + # + # match version in Gemfile.lock and use same version below + bundler: 2.5.23 bundler-cache: true + - name: Install gems + run: | + bundle _2.5.23_ install + bundle update rbs # use latest available for this Ruby version - name: Update types - run: bundle exec rbs collection update + run: | + bundle exec rbs collection update - name: Run tests run: bundle exec rake spec - name: Check PR coverage diff --git a/.rubocop.yml b/.rubocop.yml index f4463bd11..5539035d1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -92,6 +92,11 @@ Metrics/PerceivedComplexity: Max: 40 RSpec/ExampleLength: Max: 310 +# Autocorrect mangles short-style Hash tags with nested generics/parens +# (e.g. Hash{Array(String, Array) => String}) into invalid syntax. +# Confirmed broken through rubocop-yard 1.3.0 (latest as of this writing). +YARD/CollectionStyle: + Enabled: false plugins: - rubocop-rspec diff --git a/lib/solargraph/api_map.rb b/lib/solargraph/api_map.rb index 298a62390..47cc472ce 100755 --- a/lib/solargraph/api_map.rb +++ b/lib/solargraph/api_map.rb @@ -800,6 +800,13 @@ def qualify_superclass fq_sub_tag store.qualify_superclass fq_sub_tag end + # @param require_path [String] + # + # @return [Array, nil] + def resolve_require require_path + workspace.resolve_require require_path + end + private # A hash of source maps with filename keys. diff --git a/lib/solargraph/diagnostics/base.rb b/lib/solargraph/diagnostics/base.rb index ff91a9062..31b9a4342 100644 --- a/lib/solargraph/diagnostics/base.rb +++ b/lib/solargraph/diagnostics/base.rb @@ -20,8 +20,9 @@ def initialize *args # # @param source [Solargraph::Source] # @param api_map [Solargraph::ApiMap] + # @param workspace [Solargraph::Workspace, nil] # @return [Array] - def diagnose source, api_map + def diagnose source, api_map, workspace: nil [] end end diff --git a/lib/solargraph/diagnostics/type_check.rb b/lib/solargraph/diagnostics/type_check.rb index b1333f9d9..12d4f6c42 100644 --- a/lib/solargraph/diagnostics/type_check.rb +++ b/lib/solargraph/diagnostics/type_check.rb @@ -7,12 +7,12 @@ module Diagnostics # class TypeCheck < Base # @return [Array] - def diagnose source, api_map + def diagnose source, api_map, workspace: nil # return [] unless args.include?('always') || api_map.workspaced?(source.filename) severity = Diagnostics::Severities::ERROR level = args.reverse.find { |a| %w[normal typed strict strong].include?(a) } || :normal # @sg-ignore sensitive typing needs to handle || on nil types - checker = Solargraph::TypeChecker.new(source.filename, api_map: api_map, level: level.to_sym) + checker = Solargraph::TypeChecker.new(source.filename, api_map: api_map, level: level.to_sym, workspace: workspace) checker.problems .sort { |a, b| a.location.range.start.line <=> b.location.range.start.line } .map do |problem| diff --git a/spec/api_map_method_spec.rb b/spec/api_map_method_spec.rb index 063b22f32..ccf22fd9d 100644 --- a/spec/api_map_method_spec.rb +++ b/spec/api_map_method_spec.rb @@ -118,14 +118,17 @@ class B end describe '#get_method_stack' do - let(:out) { StringIO.new } - let(:api_map) { described_class.load_with_cache(Dir.pwd, out) } + let(:api_map) { described_class.load('') } context 'with stdlib that has vital dependencies' do let(:external_requires) { ['yaml'] } let(:method_stack) { api_map.get_method_stack('YAML', 'safe_load', scope: :class) } it 'handles the YAML gem aliased to Psych' do + specs = api_map.resolve_require('yaml') + specs.each { |spec| api_map.cache_gem(spec) } + api_map.catalog bench + expect(method_stack).not_to be_empty end end @@ -135,6 +138,11 @@ class B let(:method_stack) { api_map.get_method_stack('Thor', 'desc', scope: :class) } it 'handles finding Thor.desc' do + specs = api_map.resolve_require('thor') + specs.each { |spec| api_map.cache_gem(spec) } + api_map.catalog bench + + # if this fails you may not have an rbs collection installed expect(method_stack).not_to be_empty end end diff --git a/spec/language_server/message/extended/check_gem_version_spec.rb b/spec/language_server/message/extended/check_gem_version_spec.rb index 26023f505..02f0b1c4a 100644 --- a/spec/language_server/message/extended/check_gem_version_spec.rb +++ b/spec/language_server/message/extended/check_gem_version_spec.rb @@ -36,6 +36,10 @@ end it 'responds to update actions' do + status = instance_double(Process::Status) + allow(status).to receive(:==).with(0).and_return(true) + allow(Open3).to receive(:capture2).with('gem update solargraph').and_return(['', status]) + host = Solargraph::LanguageServer::Host.new message = described_class.new(host, {}, current: Gem::Version.new('0.0.1')) message.process @@ -52,6 +56,7 @@ } host.receive action end.not_to raise_error + expect(Open3).to have_received(:capture2).with('gem update solargraph') end it 'uses bundler' do diff --git a/spec/library_spec.rb b/spec/library_spec.rb index 9f9ab87dc..a21030c12 100644 --- a/spec/library_spec.rb +++ b/spec/library_spec.rb @@ -59,7 +59,7 @@ def foo(adapter) end it 'returns a Completion' do - library = described_class.new(Solargraph::Workspace.new(Dir.pwd, + library = described_class.new(Solargraph::Workspace.new('', Solargraph::Workspace::Config.new)) library.attach Solargraph::Source.load_string(%( require 'backport' diff --git a/spec/pin/base_spec.rb b/spec/pin/base_spec.rb index e11566d38..d58ffbeb8 100644 --- a/spec/pin/base_spec.rb +++ b/spec/pin/base_spec.rb @@ -52,8 +52,14 @@ end it 'deals well with known closure combination issue' do - Solargraph::Shell.new.uncache('yard') - api_map = Solargraph::ApiMap.load_with_cache('.', $stderr) + # if this fails you might not have an rbs collection installed + api_map = Solargraph::ApiMap.load '' + + spec = Gem::Specification.find_by_name('yard') + api_map.cache_gem(spec) + + bench = Solargraph::Bench.new(external_requires: ['yard']) + api_map.catalog bench pins = api_map.get_method_stack('YARD::Docstring', 'parser', scope: :class) expect(pins.length).to eq(1) parser_method_pin = pins.first diff --git a/spec/pin/method_spec.rb b/spec/pin/method_spec.rb index 6c07ced6d..de2d4d835 100644 --- a/spec/pin/method_spec.rb +++ b/spec/pin/method_spec.rb @@ -518,7 +518,9 @@ class Foo # on type. Let's make sure we combine those with anything else # found (e.g., additions from the BigDecimal RBS collection) # without collapsing signatures - api_map = Solargraph::ApiMap.load_with_cache(Dir.pwd, nil) + api_map = Solargraph::ApiMap.load(Dir.pwd) + bench = Solargraph::Bench.new external_requires: ['bigdecimal'] + api_map.catalog(bench) method = api_map.get_method_stack('Integer', '+', scope: :instance).first expect(method.signatures.count).to be > 3 end diff --git a/spec/position_spec.rb b/spec/position_spec.rb index d61b05ce5..300973a15 100644 --- a/spec/position_spec.rb +++ b/spec/position_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - describe Solargraph::Position do it 'normalizes arrays into positions' do pos = described_class.normalize([0, 1]) diff --git a/spec/rbs_map/conversions_spec.rb b/spec/rbs_map/conversions_spec.rb index 50f4b0b1a..c76032a88 100644 --- a/spec/rbs_map/conversions_spec.rb +++ b/spec/rbs_map/conversions_spec.rb @@ -97,7 +97,12 @@ def bar: () -> untyped context 'with standard loads for solargraph project' do before :all do # rubocop:disable RSpec/BeforeAfterAll - @api_map = Solargraph::ApiMap.load_with_cache('.') + @api_map = Solargraph::ApiMap.load('.') + gems = %w[parser ast open3] + bench = Solargraph::Bench.new(workspace: @api_map.workspace, external_requires: gems) + @api_map.catalog(bench) + @api_map.cache_all_for_doc_map! + @api_map.catalog(bench) end let(:api_map) { @api_map } @@ -160,7 +165,9 @@ class Sub < Hash[Symbol, untyped] if Gem::Version.new(RBS::VERSION) >= Gem::Version.new('3.9.1') context 'with method pin for Open3.capture2e' do it 'accepts chdir kwarg' do - api_map = Solargraph::ApiMap.load_with_cache('.', $stdout) + api_map = Solargraph::ApiMap.load('.') + bench = Solargraph::Bench.new(external_requires: ['open3']) + api_map.catalog(bench) method_pin = api_map.pins.find do |pin| pin.is_a?(Solargraph::Pin::Method) && pin.path == 'Open3.capture2e' diff --git a/spec/yard_map/mapper_spec.rb b/spec/yard_map/mapper_spec.rb index b2efd4cec..1114806dd 100644 --- a/spec/yard_map/mapper_spec.rb +++ b/spec/yard_map/mapper_spec.rb @@ -37,13 +37,6 @@ def pins_with require expect(pins.map(&:return_type).uniq.map(&:to_s)).to eq(['self']) end - it 'marks correct return type from RuboCop::Options.new' do - # Using rubocop because it's a known dependency - pins = pins_with('rubocop').select { |pin| pin.path == 'RuboCop::Options.new' } - expect(pins.map(&:return_type).uniq.map(&:to_s)).to eq(['self']) - expect(pins.flat_map(&:signatures).map(&:return_type).uniq.map(&:to_s)).to eq(['self']) - end - it 'marks non-explicit methods' do # Using rspec-expectations because it's a known dependency pin = pins_with('rspec/expectations').find { |pin| pin.path == 'RSpec::Matchers#expect' } From f6c351ba14b9ce7f54eb514a5748255d8f9646c2 Mon Sep 17 00:00:00 2001 From: Test Test Date: Sat, 1 Aug 2026 16:46:21 -0400 Subject: [PATCH 02/10] Fix ApiMap#resolve_require after rebase onto master Workspace#resolve_require no longer exists on master (that logic now lives on Workspace::Gemspecs, per castwide's own refactor/revert history). Route through Workspace::Gemspecs directly, matching the pattern already used in spec/workspace/gemspecs_resolve_require_spec.rb. Fixes the two api_map_method_spec.rb failures the "regression" CI job caught (YAML/Psych and Thor.desc method-stack specs) - these were masked as "pre-existing" in earlier local testing because that comparison only checked before/after within the v0.59-based branch, not across the base-branch move to master where this method moved. --- lib/solargraph/api_map.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/solargraph/api_map.rb b/lib/solargraph/api_map.rb index 47cc472ce..91481dd63 100755 --- a/lib/solargraph/api_map.rb +++ b/lib/solargraph/api_map.rb @@ -804,7 +804,7 @@ def qualify_superclass fq_sub_tag # # @return [Array, nil] def resolve_require require_path - workspace.resolve_require require_path + Workspace::Gemspecs.new(workspace.directory).resolve_require require_path end private From dc17b43523a553037ff20680a37a443a688755ad Mon Sep 17 00:00:00 2001 From: Test Test Date: Sat, 1 Aug 2026 16:51:58 -0400 Subject: [PATCH 03/10] Suppress false-positive nilable-workspace typecheck nit in resolve_require --- lib/solargraph/api_map.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/solargraph/api_map.rb b/lib/solargraph/api_map.rb index 91481dd63..5aee025b1 100755 --- a/lib/solargraph/api_map.rb +++ b/lib/solargraph/api_map.rb @@ -804,6 +804,7 @@ def qualify_superclass fq_sub_tag # # @return [Array, nil] def resolve_require require_path + # @sg-ignore Unresolved call to directory on Solargraph::Workspace, nil Workspace::Gemspecs.new(workspace.directory).resolve_require require_path end From 839ff36c43938f5f9241bdaeabf2e2137911230f Mon Sep 17 00:00:00 2001 From: Test Test Date: Sat, 1 Aug 2026 21:59:04 -0400 Subject: [PATCH 04/10] Fix Thor.desc pin caching: gemspec type mismatch + test ordering Root cause (two compounding bugs, both introduced by this branch's own earlier perf work, not upstream castwide code): 1. Workspace::Gemspecs#gemspec_or_preference returned whatever spec type it was given (Gem::Specification, Bundler::LazySpecification, or Bundler::StubSpecification) without normalizing via to_gem_specification, despite its own @return [Gem::Specification] contract. ApiMap#resolve_require (which funnels through this method) was therefore returning Bundler::StubSpecification objects that don't == the Gem::Specification objects DocMap's own uncached_yard_gemspecs/ uncached_rbs_collection_gemspecs tracking uses - so DocMap#cache's `uncached_yard_gemspecs.include?(gemspec)` check silently failed and cache_gem became a no-op. 2. spec/api_map_method_spec.rb's YAML and Thor tests called resolve_require + cache_gem *before* catalog(bench) - but catalog is what registers a gem as required in doc_map's internal tracking in the first place, so calling cache_gem first meant doc_map didn't yet know the gem needed caching. Reordered to catalog first. The YAML test happened to keep passing throughout because it's stdlib, cached via a separate always-on pathway (Ruby core RBS caching), masking both bugs for that case. Verified: reproduces and is fixed under both rbs 4.0.1 and 4.1.1; full local suite (bundle exec rake spec) is 1616 examples, 0 failures. --- lib/solargraph/workspace/gemspecs.rb | 6 +++--- spec/api_map_method_spec.rb | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/solargraph/workspace/gemspecs.rb b/lib/solargraph/workspace/gemspecs.rb index 849da9368..e9d32bfca 100644 --- a/lib/solargraph/workspace/gemspecs.rb +++ b/lib/solargraph/workspace/gemspecs.rb @@ -342,12 +342,12 @@ def preference_map @preference_map ||= preferences.to_h { |gemspec| [gemspec.name, gemspec] } end - # @param gemspec [Gem::Specification] + # @param gemspec [Gem::Specification, Bundler::LazySpecification, Bundler::StubSpecification] # # @return [Gem::Specification] def gemspec_or_preference gemspec - return gemspec unless preference_map.key?(gemspec.name) - return gemspec if gemspec.version == preference_map[gemspec.name].version + return to_gem_specification(gemspec) unless preference_map.key?(gemspec.name) + return to_gem_specification(gemspec) if gemspec.version == preference_map[gemspec.name].version change_gemspec_version gemspec, preference_map[gemspec.name].version end diff --git a/spec/api_map_method_spec.rb b/spec/api_map_method_spec.rb index ccf22fd9d..b0f60ac2a 100644 --- a/spec/api_map_method_spec.rb +++ b/spec/api_map_method_spec.rb @@ -125,6 +125,10 @@ class B let(:method_stack) { api_map.get_method_stack('YAML', 'safe_load', scope: :class) } it 'handles the YAML gem aliased to Psych' do + # catalog first so doc_map registers 'yaml' as required before we + # try to cache it - cache_gem is a no-op for gems doc_map doesn't + # yet know it needs + api_map.catalog bench specs = api_map.resolve_require('yaml') specs.each { |spec| api_map.cache_gem(spec) } api_map.catalog bench @@ -138,6 +142,10 @@ class B let(:method_stack) { api_map.get_method_stack('Thor', 'desc', scope: :class) } it 'handles finding Thor.desc' do + # catalog first so doc_map registers 'thor' as required before we + # try to cache it - cache_gem is a no-op for gems doc_map doesn't + # yet know it needs + api_map.catalog bench specs = api_map.resolve_require('thor') specs.each { |spec| api_map.cache_gem(spec) } api_map.catalog bench From 857d8f97655eab982f5b8df22cd95bdf3aa33339 Mon Sep 17 00:00:00 2001 From: Test Test Date: Sat, 1 Aug 2026 23:38:17 -0400 Subject: [PATCH 05/10] Fix same cache_gem-before-catalog ordering bug in pin/base_spec.rb Found while verifying this PR's original claimed accomplishments are still intact. Same root cause as the Thor.desc fix: cache_gem was called before catalog(bench) registered 'yard' as required, making the cache a no-op. Confirmed via isolated fresh SOLARGRAPH_CACHE: failed before this fix, passes after. It was masked in full-suite runs by another spec warming yard's cache first in the same process - not currently causing CI failures, but the same latent landmine. --- spec/pin/base_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/pin/base_spec.rb b/spec/pin/base_spec.rb index d58ffbeb8..548f3bbc9 100644 --- a/spec/pin/base_spec.rb +++ b/spec/pin/base_spec.rb @@ -55,11 +55,15 @@ # if this fails you might not have an rbs collection installed api_map = Solargraph::ApiMap.load '' + # catalog first so doc_map registers 'yard' as required before we + # try to cache it - cache_gem is a no-op for gems doc_map doesn't + # yet know it needs + bench = Solargraph::Bench.new(external_requires: ['yard']) + api_map.catalog bench spec = Gem::Specification.find_by_name('yard') api_map.cache_gem(spec) - - bench = Solargraph::Bench.new(external_requires: ['yard']) api_map.catalog bench + pins = api_map.get_method_stack('YARD::Docstring', 'parser', scope: :class) expect(pins.length).to eq(1) parser_method_pin = pins.first From ef278e4d5189374394c56472f95ce1535c830da6 Mon Sep 17 00:00:00 2001 From: Test Test Date: Sun, 2 Aug 2026 11:22:18 -0400 Subject: [PATCH 06/10] Note YARD version tested alongside rubocop-yard in CollectionStyle comment --- .rubocop.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5539035d1..e74b4decf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -94,7 +94,8 @@ RSpec/ExampleLength: Max: 310 # Autocorrect mangles short-style Hash tags with nested generics/parens # (e.g. Hash{Array(String, Array) => String}) into invalid syntax. -# Confirmed broken through rubocop-yard 1.3.0 (latest as of this writing). +# Confirmed broken through rubocop-yard 1.3.0 (latest as of this writing), +# against yard 0.9.45 (also latest as of this writing). YARD/CollectionStyle: Enabled: false From 070890e318449b31493b0b646da998d1cd590dc6 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 2 Aug 2026 14:49:30 -0400 Subject: [PATCH 07/10] Address review comments: raise instead of sg-ignore, revert cosmetic reformat - ApiMap#resolve_require: raise a clear error when called without a workspace instead of suppressing the nil-workspace typecheck warning with @sg-ignore. - .github/workflows/rspec.yml: revert the undercover job's "Update types" step back to a single-line `run:` - the block-scalar form had identical content, a no-op reformat. --- .github/workflows/rspec.yml | 3 +-- lib/solargraph/api_map.rb | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 64dbdaf46..45f931ed0 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -81,8 +81,7 @@ jobs: bundle _2.5.23_ install bundle update rbs # use latest available for this Ruby version - name: Update types - run: | - bundle exec rbs collection update + run: bundle exec rbs collection update - name: Run tests run: bundle exec rake spec - name: Check PR coverage diff --git a/lib/solargraph/api_map.rb b/lib/solargraph/api_map.rb index 5aee025b1..ef068ee74 100755 --- a/lib/solargraph/api_map.rb +++ b/lib/solargraph/api_map.rb @@ -804,7 +804,8 @@ def qualify_superclass fq_sub_tag # # @return [Array, nil] def resolve_require require_path - # @sg-ignore Unresolved call to directory on Solargraph::Workspace, nil + raise "Unable to resolve require '#{require_path}' without a workspace" if workspace.nil? + Workspace::Gemspecs.new(workspace.directory).resolve_require require_path end From 0cd66100ee16a1b137993afa47fc60902fbcf6d0 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 2 Aug 2026 15:20:08 -0400 Subject: [PATCH 08/10] Remove fork-only bundler version pin from rspec.yml Investigated why CI explicitly pinned `bundler: 2.5.23` (matching Gemfile.lock's BUNDLED WITH) in both the main rspec matrix and undercover jobs. This pin is fork-only - never merged to castwide/master - introduced in 9d2686301 "Fix new bundler issue" to work around a failure specific to the `ruby-version: head` matrix entry, which has since been removed entirely (unrelated 404 issue on ubuntu-24.04, see the @todo above the matrix). castwide/master's own rspec.yml has never had this pin and its CI passes consistently (confirmed via recent successful runs). Also reproduced locally: `bundle install` with the latest published bundler (4.0.17, vs the pinned 2.5.23) against this project's Gemfile.lock completes cleanly with no lockfile changes. This brings rspec.yml back to an exact match with castwide/master, removing it from this PR's diff. If CI still passes here, the pin was dead weight from a since-resolved, no-longer-applicable issue. --- .github/workflows/rspec.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 45f931ed0..f75bbd15d 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -40,10 +40,6 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 - # - # match version in Gemfile.lock and use same version below - bundler: 2.5.23 - name: Set rbs version run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile # /home/runner/.rubies/ruby-head/lib/ruby/gems/3.5.0+2/gems/rbs-3.9.4/lib/rbs.rb:11: @@ -71,15 +67,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' - # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 - # - # match version in Gemfile.lock and use same version below - bundler: 2.5.23 bundler-cache: true - - name: Install gems - run: | - bundle _2.5.23_ install - bundle update rbs # use latest available for this Ruby version - name: Update types run: bundle exec rbs collection update - name: Run tests From 2ac9f9a6436de6e38d9ced3b363faeecee325e0b Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 2 Aug 2026 15:43:36 -0400 Subject: [PATCH 09/10] Revert "Remove fork-only bundler version pin from rspec.yml" This reverts commit 0cd66100ee16a1b137993afa47fc60902fbcf6d0. --- .github/workflows/rspec.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index f75bbd15d..45f931ed0 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -40,6 +40,10 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true + # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 + # + # match version in Gemfile.lock and use same version below + bundler: 2.5.23 - name: Set rbs version run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile # /home/runner/.rubies/ruby-head/lib/ruby/gems/3.5.0+2/gems/rbs-3.9.4/lib/rbs.rb:11: @@ -67,7 +71,15 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' + # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 + # + # match version in Gemfile.lock and use same version below + bundler: 2.5.23 bundler-cache: true + - name: Install gems + run: | + bundle _2.5.23_ install + bundle update rbs # use latest available for this Ruby version - name: Update types run: bundle exec rbs collection update - name: Run tests From 492b000c151e8d98509b46bda8dcf42c93468ca7 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 2 Aug 2026 16:53:28 -0400 Subject: [PATCH 10/10] Document the confirmed reason for pinning bundler version in CI --- .github/workflows/rspec.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 45f931ed0..be2dd710d 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -40,9 +40,14 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 - # - # match version in Gemfile.lock and use same version below + # Without this pin, ruby/setup-ruby uses whatever bundler ships + # with each matrix Ruby version individually, rather than one + # consistent version across the matrix. Confirmed by removing + # it: stdlib/default-gem resolution changed enough that + # Workspace::Gemspecs#resolve_require('yaml') started returning + # nil, failing spec/api_map_method_spec.rb's YAML test across + # most of the matrix. Keep this in sync with Gemfile.lock's + # BUNDLED WITH version, and with the same pin below. bundler: 2.5.23 - name: Set rbs version run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile @@ -71,9 +76,9 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' - # see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119 - # - # match version in Gemfile.lock and use same version below + # See the matching pin in the rspec matrix job above for why + # this is needed - keep both in sync with Gemfile.lock's + # BUNDLED WITH version. bundler: 2.5.23 bundler-cache: true - name: Install gems