language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Expecting `svelte-check` to work with TS `--incremental` flag

Open mcmxcdev opened this issue 2 years ago • 2 comments

Describe the bug

Trying to speed up our pre-commit hook and added "incremental": true flag to tsconfig.json compiler options.

Running pnpm tsc --noEmit produces a .tsbuildinfo file while pnpm svelte-check --tsconfig ./tsconfig.json doesn't.

My understanding was that svelte-check executes tsc under the hood, but I could be wrong here!

Reproduction

  • use the following tsconfig.json:
{
  "extends": "./.svelte-kit/tsconfig.json",
  "compilerOptions": {
   	...
    "incremental": true
  }
}

  • run pnpm svelte-check --tsconfig ./tsconfig.json
  • no .tsbuildinfo file shows up

Expected behaviour

.tsbuildinfo file output for pnpm svelte-check --tsconfig ./tsconfig.json

System Info

  • OS: Ubuntu 23.04
  • IDE: VSCode

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

mcmxcdev avatar Aug 18 '23 13:08 mcmxcdev

We do not execute tsc under the hood, we merely wrap its language service API to build on top of it. I'm not sure how much work it would be to get .tsbuildinfo support into svelte-check

dummdidumm avatar Aug 18 '23 13:08 dummdidumm

Thans for the explanation!

All clear. --incremental is not set to true by default so far, but I could imagine TS changing this in a future release since it's a noticeable speed-up. Certainly would be a huge DX improvement.

mcmxcdev avatar Aug 18 '23 13:08 mcmxcdev