Run specs in parallel, speed up CI, fix concurrency bugs in specs and code - #1167
Closed
apiology wants to merge 1635 commits into
Closed
Run specs in parallel, speed up CI, fix concurrency bugs in specs and code#1167apiology wants to merge 1635 commits into
apiology wants to merge 1635 commits into
Conversation
apiology
marked this pull request as draft
January 29, 2026 13:26
# Conflicts: # .github/workflows/plugins.yml # lib/solargraph/doc_map.rb # lib/solargraph/pin_cache.rb # lib/solargraph/position.rb # lib/solargraph/shell.rb # lib/solargraph/source/chain.rb # lib/solargraph/version.rb # lib/solargraph/workspace.rb # spec/doc_map_spec.rb # spec/pin_cache_spec.rb # spec/shell_spec.rb # spec/yard_map/mapper_spec.rb # spec/yardoc_spec.rb
- shell.rb: gems 'core' called PinCache.core?/cache_core, which have never existed; dead code inherited from master, first exercised by this PR's own new CI step (solargraph gems core stdlib). Use the real, working Solargraph::RbsMap::CoreMap#pins API instead. - Fix 15 whole-repo RuboCop offenses (YARD/CollectionStyle, Style/GlobalStdStream, Style/Lambda, Style/StringConcatenation, Layout/MultilineOperationIndentation, RSpec/EmptyHook) and extend .rubocop_todo.yml's RSpec/BeforeAfterAll exclusions for two pre-existing before(:context) specs, matching the project's own auto-gen-config convention. - Update shell_spec.rb's mocked-Workspace test to stub Solargraph::Workspace.new instead of ApiMap#workspace, matching the gems command's actual (master-derived) implementation.
Bundler::LazySpecification#materialize_for_installation is an undocumented internal API (no changelog entry) whose arity changed without a deprecation path via an internal refactor (rubygems/rubygems "Pass locked platforms to materialization instead of mutating candidates", 2026-06-15). Newer Bundler requires a locked_platforms argument on the raw method and only exposes a safe default via the materialized_for_installation wrapper; older Bundler has neither the wrapper nor the argument. The existing respond_to?(:materialize_for_installation) guard only checked existence, not arity, so a bare &:materialize_for_installation call raised ArgumentError on newer Bundler/RubyGems (surfaced on the ruby-head CI matrix entry once the earlier gems-core crash was fixed). Extract materialize_specs_for_installation, preferring the modern wrapper when present, falling back to the old method only when its arity is actually zero, and skipping materialization (rather than raising) for any other/future shape. Apply the same check to the external-bundle subprocess command string, which hits the same API.
2 tasks
Contributor
Author
|
Superseded by apiology#44, which carries this work forward rebased on top of #1237. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows rspec to use more than one CPU. Really useful on modern dev machines, and also useful in CI, where the default runner size has two CPUs.
See https://github.com/apiology/solargraph/pull/27/changes for a more useful diff and commentary
To do:
Reduces the actual testing time in CI to about a minute using our small workers:
There are also a few fixes here:
Includes for mergability:
Includes this build fix:
Includes the fix for this bug, which parallel running seems to trigger (more often?):
Includes to show combined effect:
Includes transitively: