Skip to content

fix: Prefer installed Turbo for LSP#12755

Merged
anthonyshew merged 4 commits into
mainfrom
fix-vscode-lsp-resolution
May 8, 2026
Merged

fix: Prefer installed Turbo for LSP#12755
anthonyshew merged 4 commits into
mainfrom
fix-vscode-lsp-resolution

Conversation

@anthonyshew

@anthonyshew anthonyshew commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prefer the workspace-installed turbo binary for VS Code LSP startup when it supports the internal LSP entrypoint, falling back to the packaged LSP only when needed.
  • Log each LSP resolution step so failures are debuggable without showing popups unless every resolution path fails.
  • Make LSP daemon startup/recovery more tolerant by allowing incompatible daemons to be restarted and using a bounded 5-attempt connection retry.

Resolution order

  1. Configured turbo.path, if it supports __internal_lsp.
  2. Workspace node_modules/.bin/turbo, if it supports __internal_lsp.
  3. turbo on PATH, if it supports __internal_lsp.
  4. Packaged turborepo-lsp-* fallback.

Retry behavior

  • CONNECT_RETRY_MAX: 5
  • CONNECT_TIMEOUT: 1s per connect attempt
  • SOCKET_TIMEOUT: 5s waiting for pid/socket files on non-Windows
  • SOCKET_ERROR_WAIT: 100ms between socket connection retries

Fixes #4608
Fixes #9869

@anthonyshew anthonyshew requested a review from a team as a code owner May 8, 2026 04:17
@anthonyshew anthonyshew requested review from tknickman and removed request for a team May 8, 2026 04:17
@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-svelte-web Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
examples-vite-web Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am
turbo-site Ready Ready Preview, Comment, Open in v0 May 8, 2026 4:23am

@anthonyshew anthonyshew merged commit e8e4df4 into main May 8, 2026
62 checks passed
@anthonyshew anthonyshew deleted the fix-vscode-lsp-resolution branch May 8, 2026 12:39
anthonyshew pushed a commit that referenced this pull request May 8, 2026
## Release v2.9.11-canary.3

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/25556157819)

### Changes

- fix: Include file URIs in LSP lifecycle logs (#12751) (`e64060f`)
- fix: Handle JSON decoration visitor depth (#12752) (`5e9cee5`)
- fix: Resolve relative `turbo path` in VS Code extension (#12753)
(`ca09ff1`)
- fix: Preserve Bun nested dependencies during prune (#12754)
(`84a161f`)
- fix: Prefer installed Turbo for LSP (#12755) (`e8e4df4`)
- release(turborepo): 2.9.11-canary.2 (#12750) (`4084382`)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew pushed a commit that referenced this pull request May 9, 2026
## Release v2.9.11

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/25582894003)

### Changes

- release(turborepo): 2.9.10 (#12745) (`4b3e7cc`)
- ci: Publish VS Code extension on release (#12747) (`1293d22`)
- fix: Start daemon for VSCode Extension from the extension itself
(#12749) (`07a56d3`)
- release(turborepo): 2.9.11-canary.1 (#12748) (`0532c83`)
- fix: Include file URIs in LSP lifecycle logs (#12751) (`e64060f`)
- fix: Handle JSON decoration visitor depth (#12752) (`5e9cee5`)
- fix: Resolve relative `turbo path` in VS Code extension (#12753)
(`ca09ff1`)
- fix: Preserve Bun nested dependencies during prune (#12754)
(`84a161f`)
- fix: Prefer installed Turbo for LSP (#12755) (`e8e4df4`)
- release(turborepo): 2.9.11-canary.2 (#12750) (`4084382`)
- ci: Parallelize LSP release publishing (#12758) (`25aba68`)
- fix: Reduce VS Code extension startup popups (#12759) (`3c9ab14`)
- fix: Support `turbo.jsonc` in VS Code extension (#12760) (`3b3776b`)
- fix: Remove VS Code task key gradient (#12761) (`00c43d4`)
- release(turborepo): 2.9.11-canary.3 (#12756) (`bdeb64a`)
- chore: Release v2.9.11-canary.4 (#12762) (`20fa5c8`)
- ci: Stop VS Code publish from blocking release PR (#12763) (`8a0bd8b`)
- release(turborepo): 2.9.11-canary.5 (#12764) (`bfffbaa`)
- fix: Publish VS Code extension from release tag (#12765) (`2db74b4`)
- fix: Support shimmed VS Code LSP probes (#12767) (`e7c4575`)
- release(turborepo): 2.9.11-canary.6 (#12766) (`5a4310d`)
- release(turborepo): 2.9.11-canary.7 (#12768) (`87d468b`)
- fix: Allow TURBO_EXTENDS in LSP diagnostics (#12770) (`a968db7`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant