Skip to content

Fix Sorbet LSP crash from two config dirs - #23980

Merged
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
HaraldNordgren:lsp-single-dir
Sep 15, 2026
Merged

MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
HaraldNordgren:lsp-single-dir

Conversation

@HaraldNordgren

@HaraldNordgren HaraldNordgren commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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 by Pending response rejected since connection got disposed.

The cause: sorbet/config gained a second --dir for .github/scripts in 729e835 (#23915), but that file's arguments apply to every srb tc invocation including --lsp, which only supports one input directory. This moves .github/scripts out of the shared config and adds it on the command line instead, everywhere except --lsp runs.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Disclosure: drafted with Claude Code assistance; I reviewed the change and reasoning and will answer questions myself.


`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.

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 15, 2026
Merged via the queue into Homebrew:main with commit e58007e Sep 15, 2026
56 checks passed
@HaraldNordgren
HaraldNordgren deleted the lsp-single-dir branch September 15, 2026 16:47
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