You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build hangs indefinitely after updating TypeScript to 4.9.3 #51592
If rollup is hanging, I'd recommend logging an issue at their repo.
We didn't update rollup or any plugin, we updated TypeScript to 4.9.
The only thing we changed was the TypeScript version.
I'm not sure what you're expecting from a log. --extendedDiagnostics will print a performance overview, though.
I've added extendedDiagnostics and it is now visible that TypeScript is running at the time the build hangs and is also the last thing that emits logs.
Here it is also clear that the build run on macos is doing much more than on other platforms. There are ±60k log lines when it gets stuck instead of ±36k on the other platforms.
Please let me know how to provide more info on this issue.
Can you try setting watchOptions in the tsconfig files to { "watchFile": "PriorityPollingInterval" } and give that a try.
I see lot of file watcher triggered event and i am not sure if the change to use fsEvents by default would have caused this so just trying to rule it out.
I've experienced this going from 4.8 to 4.9 also. I don't yet have anything more to add which is why I'm commenting rather than creating a new issue. After about 10 minutes, my machine runs out of memory and tsc crashes. I can provide that dump if it's of use, just let me know.
Activity
RyanCavanaugh commentedon Nov 18, 2022
It doesn't look like tsc is running when the job timed out, from my reading of the log. It ran at line 23 and then other stuff runs.
I'd need a more definitive blame than this to investigate further.
romainmenke commentedon Nov 18, 2022
Are there any flags of options we can pass to tsc to get a more useful debug log?
romainmenke commentedon Nov 18, 2022
tsc is called directly only once. Rest of the usage is through rollup.
RyanCavanaugh commentedon Nov 18, 2022
If tsc runs and finishes I'm not sure what you're expecting from a log.
--extendedDiagnosticswill print a performance overview, though.If rollup is hanging, I'd recommend logging an issue at their repo.
romainmenke commentedon Nov 19, 2022
We didn't update rollup or any plugin, we updated TypeScript to 4.9.
The only thing we changed was the TypeScript version.
I've added
extendedDiagnosticsand it is now visible that TypeScript is running at the time the build hangs and is also the last thing that emits logs.https://github.com/csstools/postcss-plugins/actions/runs/3502766465/jobs/5867377495
I've done another run with even more diagnostics enabled :
https://github.com/csstools/postcss-plugins/actions/runs/3502799996/jobs/5867432582
Here it is also clear that the build run on macos is doing much more than on other platforms. There are ±60k log lines when it gets stuck instead of ±36k on the other platforms.
Please let me know how to provide more info on this issue.
[-]Build hangs indefinitely[/-][+]Build hangs indefinitely after updating TypeScript to 4.9.3[/+]romainmenke commentedon Nov 22, 2022
Ryan Cavanaugh (@RyanCavanaugh) can you let me know which info I can provide to help you investigate?
To reproduce this locally you should be able to follow these steps and get the same issue :
revert-713-typescript-4.8--intuitive-labradoodle-bd363b90e9npm cinpm run buildsheetalkamat commentedon Nov 22, 2022
May be #51627 helps with your issue. Do you want to give that a try
andrewbranch commentedon Nov 22, 2022
I couldn’t reproduce with those steps on an Intel Mac.
romainmenke commentedon Nov 23, 2022
🤔 tricky
I've let it run again to make sure I wasn't encountering some glitch before :
4.8.x4.9.xon this test branchResult is the same. Build hangs indefinitely.
I will try to gather as much info as I can about the env in those runners.
romainmenke commentedon Nov 23, 2022
Sheetal Nandi (@sheetalkamat) That also get's stuck :/
romainmenke commentedon Nov 23, 2022
Managed to track it down to this commit : 7ab89e5
Unfortunately it is a massive merge commit :/
But everything after that one fails, everything before it is fine.
sheetalkamat commentedon Nov 23, 2022
Can you try setting
watchOptionsin the tsconfig files to{ "watchFile": "PriorityPollingInterval" }and give that a try.I see lot of file watcher triggered event and i am not sure if the change to use
fsEventsby default would have caused this so just trying to rule it out.romainmenke commentedon Nov 23, 2022
Did a couple of runs with this setting and I still saw failures :
config I added : csstools/postcss-plugins@4e91ce9
Is there a way to disable file watching completely?
These are single build runs so I am unsure if file watching is even needed for this?
sheetalkamat commentedon Nov 23, 2022
i am not sure who is starting file watching in your case. so i dont know how to disable it,.
romainmenke commentedon Nov 23, 2022
It seems that the rollup plugin for typescript always creates
ts.createWatchProgramwhich is weird.https://github.com/rollup/plugins/blob/master/packages/typescript/src/watchProgram.ts#L202
This snippet seems to detect that Typescript has started or finished : https://github.com/rollup/plugins/blob/master/packages/typescript/src/watchProgram.ts#L81-L97
I wished the maintainer of the rollup showed more interest in this issue.
I don't have any context of either TypeScript internals or rollup internals.
I am going to ask my colleague who was able to reproduce locally to provide more info first.
Thank you all for spending time on this 🙇
romainmenke commentedon Nov 25, 2022
I can no longer reproduce this issue when testing with the latest commit currently on the main branch.
f6628a4
Haven't pinpointed the commit yet where the issue went away.
Still waiting on that.
romainmenke commentedon Nov 25, 2022
This commit is the first one that works fine : e50bb07
It doesn't make any sense to me.
Because in that commit only a dev dependency was changed.
I ran the tests so many times now and on that commit it works consistently.
Before that commit it fails.
Normally I am quite good at finding root causes but this issue really has me stumped.
Truly no idea what is going on here.
To pinpoint this commit I took this steps :
git --no-pager log v4.9.3...f6628a4573cd37c26912f78de3d08cd1dbf687a5 --format=format:%Hpackage.json:Is the git history maybe not linear?
That would invalidate my approach.
romainmenke commentedon Dec 12, 2022
I can no longer reproduce this on TypeScript
5.xor4.9.4.I have no idea what was really going on, hopefully this doesn't come back :)
Thank you all for taking a look at this and providing insights!
jasonmit commentedon Jan 19, 2023
I've experienced this going from 4.8 to 4.9 also. I don't yet have anything more to add which is why I'm commenting rather than creating a new issue. After about 10 minutes, my machine runs out of memory and
tsccrashes. I can provide that dump if it's of use, just let me know.