-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript 2.0 related garbage collection issue affecting ts-loader #11452
Comments
this is not a GC issue. this is out of memory issue. have you checked what are you holding on to while running these tests? do you clean the state after every test? it is possible that TS 2.0 is using more memory than TS 1.8 so tests used to pass barely in 1.8, but starts to break in TS 2.0. I would start looking at memory profiles with running the tests, and see what is held in memory after each test. if you see TS holding to objects that it should not hold on to, then it is a TS issue, if your tests are holding to objects that it should not hold on to, then it is a test cleanup issue. |
Thanks for the response @mhegazy. I've just picked up looking into the ts-loader test pack and don't know the code very well - it's a little unclear. I'll do some investigation. I thought it was worth asking the question though since it's not been a problem before. |
Was able to work around the issue. |
I'm quite sure ts-loader's problem is exactly what @mhegazy said. ts-loader barely passed tests under 1.8. And 2.0's flow checking just uses more memory and ts-loader blows up. The correct fix is to clean up compiler instance after each test. |
Yup - that's effectively what we're doing now |
For what it's worth we now have a new test pack in ts-loader that's less brittle than the existing one. (We run both packs in our continuous integration tests.) We've also taken steps to make the existing pack more resilient. |
Hi,
I'm helping out on ts-loader and trying to get a new version shipped. As part of this I've extended our integration test pack, which already runs against TypeScript 1.6, 1.7 and 1.8 to run against 2.0 as well. Here's the rub....
Our integration test pack rolls over and dies once we start using TS 2.0. See an example here: https://travis-ci.org/TypeStrong/ts-loader/jobs/165652081
However other versions of TypeScript with the exact same codebase do not face this issue; see this example running against TS 1.8. (Yes there are failing tests here; but those are things that need addressing; the test pack isn't actually failing to run.)
It may be a a node problem (well maybe) - I can see perhaps related issues:
webpack/webpack#1875
nodejs/node#1741
karma-runner/karma#1868
To be clear; ts-loader works with TS 2.0. But it's clearly causing strain that the previous versions of TypeScript didn't.
Do you have any idea of why TS 2.0 might seem to be triggering this issue? I'm well aware that our integration test pack may well be less than ideal but I'm surprised that this issue is occurring. Any suggestions gratefully received!
Expected behavior:
TypeScript 2.0 doesn't experience a garbage collection problem in our test pack.
Actual behavior:
TypeScript 2.0 does experience a garbage collection problem in our test pack.
The text was updated successfully, but these errors were encountered: