Related: #846 and #66. The CLI exact TypeScript 5.7.3 controls already cover TS6053 for a missing config files root and TS6504 for a JavaScript config root when JavaScript admission is disabled. LspProject.create now seeds readable, allowed files roots into Program (8602d3f) and preserves them across importer revisions, but seedExplicitConfigRoots currently skips a missing file or disallowed JavaScript root without an LSP-visible project diagnostic. This lets the editor start, but omits the config error the project still has. Implement a project/config diagnostic publication path that reports the exact TS6053/TS6504 code, message, and config-root path, without admitting an invalid root or preventing valid roots from compiling. Cover initial project load and a watched config/root change. Do not treat an absent root as an empty source and do not suppress the error.
fix(ts): publish config-root admission errors in LSP
#961Progress: d7fd442 is pushed directly to origin/main as glenn, without coauthors. LspProject now publishes structured, exact-code TS6053/TS6504/TS6054 config-root diagnostics on initial load, keeps valid roots admitted, and re-evaluates roots on watched file creation/deletion. The regression test covers missing root -> creation/clear -> deletion/reappear, plus disallowed JavaScript root with a valid sibling; guarded tsc_main tests pass (2,128 MB peak, 34% host low-water). This is not complete yet: a watched tsconfig edit does not reparse/reconfigure the live project, so keep #961 open for config-change lifecycle coverage and exact oracle verification of the LSP message.
Completed by d7fd442 and 449b674 on origin/main. Initial LSP project load publishes structured TS6053/TS6504/TS6054 for invalid explicit roots with the exact CLI-derived message and absolute root path. Watched root create/delete clears or restores diagnostics without phantom sources. A watched tsconfig change now rebuilds resolver, Program, checker adapter, and compile options; it re-seeds explicit roots, preserves unsaved open-editor buffers, recompiles, and republishes open-document diagnostics. Tests cover allowJs off -> on -> off, config deletion/recreation, unsaved-source retention, and exact TS6053/TS6504 messages. The red config-watcher test was 97/98 before the fix; guarded tsc_main is green after it (latest peak 2,346 MB, host low-water 29%). Guarded test-tsc-streams also exits 0. This closes the explicit-root LSP lifecycle scoped here; broader #846 parity and unrelated config syntax diagnostics remain separate.
Sign in to comment on this issue.