Skip to content

fix: report a tsconfig parse error in incremental runs instead of an internal error - #3169

Open
GBra-4-669 wants to merge 1 commit into
sveltejs:masterfrom
GBra-4-669:fix/windows-tsconfig-parse-error
Open

GBra-4-669 wants to merge 1 commit into
sveltejs:masterfrom
GBra-4-669:fix/windows-tsconfig-parse-error

Conversation

@GBra-4-669

@GBra-4-669 GBra-4-669 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Malformed tsconfig with --incremental or --tsgo and a path that is not normalized gives an internal Debug Failure instead of the parse error. Ordinary Windows paths hit it. So does any . or .. segment.
TypeScript asserts that the diagnostic name equals the normalized name of the file it parsed.

The overlay writer now passes the resolved real path as the name so the parse error points at the right file. For a path through a symlink that means it names the resolved file instead of the path you passed. The read still uses the original path so symlinks and .. resolve like before.

New testFailure cases assert exit 1, the svelte-check failed line and the expected text:

  • invalid option combination
  • unparseable tsconfig
  • filename with a backslash
  • . segment
  • symlink + ..
    All of them fail before the compiler process starts. The crash cases fail in it.

Test plan: node test-sanity.js on Linux, Windows and macOS.

Not tested: Windows \\?\ paths. Two language-server places hit the same assert: service.ts for the default run, typescript-go/features/DiagnosticsProvider.ts for --tsgo-experimental-api.

@changeset-bot

changeset-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8b410c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte-check Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant