Skip to content

Integration batch b4d: castwide/solargraph#1407 - #249

Closed
apiology wants to merge 11 commits into
2026-10-19-batch-b44dfrom
2026-10-19-batch-b4d
Closed

apiology wants to merge 11 commits into
2026-10-19-batch-b44dfrom
2026-10-19-batch-b4d

Conversation

@apiology

Copy link
Copy Markdown
Owner

Claude: Integration batch: merges castwide#1407 onto the #44 batch (ebfb362), whose specs cache their own gems and whose warm-up fills both gem cache directories.

apiology and others added 11 commits October 9, 2026 13:25
Gem pins are mapped from gem source and serialized, so a plugin's
conventions shape what lands in the gem cache. The language server
caches gems by running `solargraph cache` in a subprocess, which never
loaded the workspace's plugins, so the cache it wrote could differ from
the one an in-process typecheck builds.

`cache` and `uncache` now require the plugins configured for the
directory, through a Workspace::Config#require_plugins that Workspace
also delegates to. Each loaded plugin and its gem version are recorded
in CacheDir, and gem_dir includes them, so loading or upgrading a
plugin rebuilds the gem cache instead of reusing pins made without it.

The @sg-ignore in CacheDir.add_plugin records a typecheck defect:
Hash#each_value.find types the block parameter as the value type
unioned with the hash itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
A plugin was recorded in the gem cache key only when the workspace
config required it. A process that requires the plugin directly, such
as a plugin spec suite using a workspace without config, mapped gems
with the plugin loaded but read and wrote the plain gems directory,
so it missed caches built by `solargraph gems` with the plugin
configured.

Record the gem that defines each registered convention, and key
config-required plugins by gem name so both paths give the same key.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
Keep the natural Hash iteration and mark the Solargraph gap: the
each_value block param is typed as the Hash pair, not the value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
The parent keys gem_dir on the plugins it has loaded, while
`solargraph cache` re-read the --directory config. When the two sets
differ (a workspace built with another config, a plugin loaded by
plain require, or several workspaces in one process), the subprocess
writes its pins to a directory the parent never reads, and
Library#cache_next_gemspec re-caches the gem forever.

Record what to require for each plugin and pass that list with
--plugins, so the subprocess loads the same set and writes to the
same gem_dir.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
Undercover flagged the block in Shell#require_plugins that requires
each plugin named by --plugins: the only spec passed an empty string,
so the require, CacheDir.add_plugin and LoadError branches never ran.
Add specs for a loadable plugin and a missing one, and clear the
plugin from CacheDir.plugin_requires after each example.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
Specs that build a workspace at the repo root load the plugins in its
.solargraph.yml, as the plugin CI jobs configure, and require_plugins
then records them with CacheDir.add_plugin. That switched
CacheDir.gem_dir to a cold plugin-keyed directory for the rest of the
spec process. Save, clear and restore CacheDir.plugins and
plugin_requires around every example, which also makes the per-spec
CacheDir cleanup in shell_spec and config_spec redundant.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
A before(:all) workspace load, such as the repo-root ApiMap that
conversions_spec builds, runs outside the per-example around hook, so
the plugins it records stayed in CacheDir for every later example.
Save, clear and restore them around each context as well.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
… plugins

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SEntZKsZwQHhzqcwG7MTqn
@apiology

Copy link
Copy Markdown
Owner Author

Claude: Closing: superseded by batch b4e, rebuilt on the b44e batch.

@apiology apiology closed this Oct 22, 2026
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.

1 participant