Fix Sorbet LSP crash from two config dirs - #23980
Merged
Merged
Conversation
`sorbet/config` gained a second `--dir` for `.github/scripts` in 729e835, but Sorbet's LSP mode only supports a single input directory and refuses to start with more than one, crashing `brew typecheck --lsp` (and the VS Code Sorbet extension with it) with: Sorbet's language server requires a single input directory. However, 2 are configured: [., ../../.github/scripts] Move the `.github/scripts` directory out of the shared config and add it on the command line instead, everywhere except `--lsp` runs.
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.
The Sorbet "Brew Typecheck" extension in VS Code wouldn't start: it kept crashing and looping on launch, with
Sorbet's language server requires a single input directory. However, 2 are configured: [., ../../.github/scripts]followed byPending response rejected since connection got disposed.The cause:
sorbet/configgained a second--dirfor.github/scriptsin 729e835 (#23915), but that file's arguments apply to everysrb tcinvocation including--lsp, which only supports one input directory. This moves.github/scriptsout of the shared config and adds it on the command line instead, everywhere except--lspruns.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Disclosure: drafted with Claude Code assistance; I reviewed the change and reasoning and will answer questions myself.