π Search Terms
TS6059, rootDir, flaky error count, singleThreaded
π Version & Regression Information
seeing it on 7.0.2 and on main (4f5ddae). havent tried older versions
β― Playground Link
No response
π» Code
repros on material-ui's docs project (the mui-docs scenario in typescript-benchmarking):
git clone https://github.com/mui/material-ui.git
cd material-ui
git checkout 190a83cf3784c53b57d7a80cf96df27276eed079
pnpm install --ignore-scripts
for i in 1 2 3 4 5 6; do
npx -p typescript@7.0.2 tsc -p docs --outDir /tmp/out --pretty false | grep -c 'error TS'
done
tried to get a small repro (tsconfig paths pointing outside rootDir, a JS barrel re-exporting TS files outside rootDir) but everything i tried was stable
π Actual behavior
the error count changes between runs of the exact same command. on 7.0.2 i got 11378, 11405, 11401, 11405, 11405, 11400. almost all of them are TS6059 (File 'β¦' is not under 'rootDir' 'docs')
with --singleThreaded its 11403 every time. --checkers 1 still flakes so i think it's coming from loading files in parallel and not from the checkers
the ones that go missing are reported inside other files that are also outside rootDir, e.g.
packages/mui-system/src/borders/index.ts(1,25): error TS6059: File 'packages/mui-system/src/borders/borders.ts' is not under 'rootDir' 'docs'. 'rootDir' is expected to contain all source files.
the "The file is in the program because:" lists also come out in a different order each run
π Expected behavior
same errors every run, same as --singleThreaded
Additional information about the issue
my guess is each file only gets one TS6059, reported at whichever import got recorded first, and that depends on which files finished loading first. when that import is in a file whose errors dont get reported the error just disappears. couldnt confirm it with a small repro though so i might have the trigger wrong
found this while benchmarking #64474, used claude code to help track it down
π Search Terms
TS6059, rootDir, flaky error count, singleThreaded
π Version & Regression Information
seeing it on 7.0.2 and on main (4f5ddae). havent tried older versions
β― Playground Link
No response
π» Code
repros on material-ui's docs project (the
mui-docsscenario in typescript-benchmarking):tried to get a small repro (tsconfig
pathspointing outsiderootDir, a JS barrel re-exporting TS files outsiderootDir) but everything i tried was stableπ Actual behavior
the error count changes between runs of the exact same command. on 7.0.2 i got 11378, 11405, 11401, 11405, 11405, 11400. almost all of them are TS6059 (
File 'β¦' is not under 'rootDir' 'docs')with
--singleThreadedits 11403 every time.--checkers 1still flakes so i think it's coming from loading files in parallel and not from the checkersthe ones that go missing are reported inside other files that are also outside
rootDir, e.g.the "The file is in the program because:" lists also come out in a different order each run
π Expected behavior
same errors every run, same as
--singleThreadedAdditional information about the issue
my guess is each file only gets one TS6059, reported at whichever import got recorded first, and that depends on which files finished loading first. when that import is in a file whose errors dont get reported the error just disappears. couldnt confirm it with a small repro though so i might have the trigger wrong
found this while benchmarking #64474, used claude code to help track it down