Skip to content

Parallel rspec - #27

Open
apiology wants to merge 281 commits into
2026-01-31from
parallel_rspec
Open

Parallel rspec#27
apiology wants to merge 281 commits into
2026-01-31from
parallel_rspec

Conversation

@apiology

Copy link
Copy Markdown
Owner

No description provided.

expect(tester.host).to be_a(Solargraph::LanguageServer::Host)
expect(tester.host).not_to be_stopped
expect(tester.host).not_to be_fully_stopped
tester.host.fully_stop

@apiology apiology Feb 12, 2026

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With test files running in a different order than before, I was seeing issues with RuboCop (which chanes directories temporarily as part of its configuration reading) still running in the background while other specs started, leading to things running in random directories. This is intended to ensure that RuboCop has finished before moving on.

specs = api_map.resolve_require('kramdown-parser-gfm')
specs.each { |spec| api_map.cache_gem(spec) }
bench = Solargraph::Bench.new(source_maps: [source_map], external_requires: ['kramdown-parser-gfm'])
api_map.catalog bench

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trim a couple of steps off while loading this gem


it 'finds a known dependency' do
expect(deps.map(&:name)).to include('backport')
expect(deps.map(&:name)).to include('rbs')

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to avoid referencing the same gem in more than one area to track down concurrency issue installing/removing the backport gem.

apiology and others added 20 commits February 12, 2026 04:33
* Improve signature combination

Use our generated RBS signature from parameters as a key to combine
method signatures from RBS/YARD pins.

This is closer to what RBS does than the current technique of using
the arity alone, and fixes a key degenerate case in Integer#+ revealed
by updated definitions used by recently released RBS gems

* Update annotations

* Drop annotation

* Fix RuboCop issue

* Fix merge

* Don't use solargraph-rspec branch

* Fix merge

* Debug

* Add another use of stdlib dependencies in RBS

* Mock additional call

* Fix annotations

* Update types in rspec undercover

* Debug

* Debug

* Drop incorrect rbs collection use in spec

* Update rubocop todo

* Revert change

* Fix RuboCop issue

* Fix annotations

* Fix annotations

* RuboCop fix

* Use "type arity" to guide signature combination

* Update rubocop todo

* Include return type arity in comparison

* Add dodgy return type

* Fix RuboCop issue

* Add Ruby 4.0 jobs

* Exclude another combo

* Exclude another combo

* Update rules to use report?

* Fix merge

* Fix merge

* Drop dead code

* Bump version to 0.59.0.dev.1

* Rename rule

* Update RuboCop todo file

* Update RuboCop todo file

* Ratchet rubocop TODO file

* Move to skip:

* Mark spec as pending

* Revert spec change

* Drop old workaround

* Fix merge

* Fix typechecking issues

* Revert doc

* Fix spelling

* Fix merge issue

* Exclude the current gemspec from pins brought in from gem

* Check pathname instead

* Add sg-ignore

* Avoid rbs pollution

We were using the sig/shims directory for some internally helpful
shims; unfortunately that exported them during gem installs, causing
castwide#1144

* Test with RBS 4.0.0.dev.5

* Open up in gemspec

* Fix missing spot

* Typecheck using RBS prereleases

* Move point of ignoring cached gems for gem projects

* Fix issues resolving cgi escape functions

* Be more careful marking things as stdlib

* Reclassify rbs gem

* Fix merge

* Add sg-ignore

* Fix merge

* Remove outdated workaround

* Fix @sg-ignore name

* Restore workaround

* Restore workaround

* Merge branch 'flow_sensitive_typing_2_0' into 2025-01-06

* Fix method signature

* Fix annotations

* Add regression test and fix for issue found during future merge

* Add regression test and fix for issue found during future merge

* Fix merge

* Fix merge

* Fix merge

* Fix merge

* Use correct field for self type resolution

Add a regression test and fix for self type resolution issue found on
a future branch

* Fix 'solargraph pin --references ClassName' private method call

* Add error handling

* Fix another location with another test case

* Drop now-unneeded @sg-ignore

* Don't log caching for each dependent library

This causes duplicate logging on standard libraries, many of which are
esoteric (e.g., "cgi-escaping").  The current method as of the
2025-01-06 branch would result in each stdlib library being cached
individually.

* Drop logging entirely

* Fix some types based on future branch feedback

* Provide Gem::Specification to outside interface

* Provide Gem::Specification to outside interface

* Use #to_spec

* Provide Gem::Specification to outside interface

* Fix typechecking error

* Use consistent bundler versions

* Fix type issue

* Fix annotations based on future branch feedback

* Add some @todos

* Fix annotations

* Fix annotations

* Fix annotation

* Add diff::lcs shim

* Improve spec expectations

* Add @sg-ignore

* Fix rspec checks to run on all types of PRs

* Fix merge

* Fix merge

* Fix merge

* Avoid rbs pollution (castwide#1146)

We were using the sig/shims directory for some internally helpful
shims; unfortunately that exported them during gem installs, causing
castwide#1144

* Fix 'solargraph pin --references ClassName' private method call (castwide#1150)

* Manual rubocop fixes

Some hand-changed fixes for RuboCop issues

* RuboCop manual fixes

* RuboCop manual fixes

* Improve memory efficiency of Position class (castwide#1054)

* Use each_line instead of text.lines

Avoid allocating additional strings, instead use sliced substrings

* gitignore vendor/cache

* Remove redundant end_with?

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>

* Remove benchamrks

castwide#1054 (comment)

* String#index(offset:) FTW 🚀

castwide#1054 (comment)

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>

* fix rubocop

---------

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>

* RuboCop manual fixes

* RuboCop manual fixes

* RuboCop manual fixes

* RuboCop manual fixes

* RuboCop manual fixes

* RuboCop manual fixes

* RuboCop manual fixes

* RuboCop manual fixes

* Raise InvalidOffsetError for offsets > text (castwide#1155)

* Raise InvalidOffsetError for offsets > text

* Linting

* Fix fencepost error

* Additional fencepost test

* Document exception

* Refactor RbsMap::Conversions

Let's work more directly with type objects and reduce duplication

* Release 0.58.2

* Complete other_type_to_type transition

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Add @sg-ignores

* Fix tuple issue

* Refactor

* Tuple -> Array()

* Add @sg-ignore

* Use rooted names, clarify intent

* Refactor

* Remove TODOs, add asserts

* Fix solargraph-rspec spec failure

* Fix merge

* Adjust rubocop todo

* Debug logging fixes

* Reproduce build problem with RBS pre-release

* Stop hard-coding bundler version

* Use bundler preferred by setup-ruby step

* Fix merge

* rubocop -a

* manual typechecking fixes

* Fix indentation

* Sync @sg-ignores with CI

* rubocop -A

* Fix typechecking issues

---------

Co-authored-by: Lekë Mula <l.mula@finlink.de>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Fred Snyder <fsnyder@castwide.com>
* Ignore workspace dependencies in cache processes

* Fix rebuild option

* Update rubygems

* Update Ruby

* Reapply bundle fixes

* Comment

* Load workspace for local RBS
…de#1172)

* Allow vernier gem to be used optionally, but don't require it

* Add gem for typechecking

* Add gem for typechecking

* Apply suggestion from @apiology
* Position linting

* Position spec linting

* Redundant tests

* Server notifications use $stderr.puts instead of warn

* Add sg-ignore

* More sg-ignore tags

* Move sg-ignore tag
* Revert YARD and RBS pin caching

* Update specs

* Fix argument

* Shell specs for unbundled environments

* Linting

* Linting

* Skip reason

* Split long string

* Ignore missing alias in RuboCop RBS

* Type alias reference pins (castwide#1181)

* Type alias reference pins

* Type tags

* Fix method name

* Typify with type alias pins

* Rooted aliases

* TypeAlias source

* TypeAlias type_location

* Fix TypeAlias return type

* Update sg-ignore tags

* Fix Pin::Base#typify format

* Skip Ruby < 3.4 on flaky test

* Switch to RBS < 4

* Stub failing test

* Test requires RBS >= 3.10.0

* Exclude Ruby 3.0 and RBS 3.10.0

* Skip the test

* Stale type aliasing

* Linting

* Fix dependency resolution

* Errant autoload

* Skipped test

* Strong typechecking errors

* Linting

* Linting and typechecking

* Typecheck errors

* Linting

* Typecheck

* Use rbs 4.0.1

* Allow nested methods like `Hash::_Key`

* Unalias unique types

* Fix ApiMap mock

* Typechecking

* Remove sg-ignore for Vernier
…ide#1183)

* Unbundled environment tests emit error messages

* Force require pathname
# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants