SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 16 Rust

fix(lsp): walk to enabled nested workspaces (#34654)

Closes denoland/divybot#390
Fixes denoland/deno#28681

### Summary

This fixes LSP workspace preloading when a workspace root is disabled
but a nested workspace folder is explicitly enabled.

### How this fixes the issue

The bug happened because `Inner::walk_workspace()` asks
`Settings::path_enabled()` before descending into each directory. With
`deno.enable` disabled at the root and enabled only for a nested
workspace, the walk would skip disabled ancestor directories like
`apps/` before it could ever reach the enabled folder, so the LSP never
discovered that nested workspace's `deno.json` or source files.

This change keeps those ancestor directories walkable when they contain
a separately enabled workspace folder, while preserving the disabled
result for unrelated root files and sibling directories. That lets the
preload walk reach the enabled nested workspace without re-enabling the
rest of the disabled root.

### Tests

- `config_path_enabled_for_nested_workspace_folder` covers the
`Settings::path_enabled()` behavior for disabled roots and enabled
nested workspaces.
- `test_walk_workspace_reaches_enabled_nested_workspace` verifies the
actual workspace walk reaches the nested workspace files and excludes
disabled siblings/root files.

---------

Co-authored-by: divybot <divybot@users.noreply.github.com>
Co-authored-by: Divy Srivastava <me@littledivy.com>
E
em committed
3b0cdf47d044cdfb9d056106902b9ac17e01580e
Parent: ce605a1
Committed by GitHub <noreply@github.com> on 6/2/2026, 4:50:31 AM