Open samreid opened 2 months ago
Yesterday during dev meeting, I kinda looped this issue into https://github.com/phetsims/chipper/issues/1424 in our priorities discussion. This is a big reason to increase the priority of https://github.com/phetsims/chipper/issues/1424, though not the only reason to work on that issue (phet-lib/doc/speedup/etc).
Similar to https://github.com/phetsims/chipper/issues/1415. Today @zepumph @jonathanolson and CT all reported heap memory errors while running tsc on tsconfig/all. For instance, CTQ reported:
@zepumph and I knew the memory overhead was near for #1415 but we were surprised to see it already happening in
tsc
. Though we acknowledge there is variability from run to run (even though there is no caching or incrementaling).In testing with @jonathanolson we saw that we might buy some time by running tsc in a separate script. Having lint and other things running in the same script may lower the memory ceiling a bit. This worked for a script that @jonathanolson was using, but CTQ already runs it in an isolated script.
A short term workaround is to boost the Node heap space, but this is tricky since it must be done on every developer machine (including open source developers), every server and service, such as bayes and the production servers, etc. We do not currently have one place where we factor out a call to
tsc
so we don't have a place where we can uniformly boost that memory. Different developers do this different ways at the moment.@zepumph and I believe the best solution to this will be to move to incremental type checking which is described in https://github.com/phetsims/chipper/issues/1424 which is blocked by https://github.com/phetsims/tasks/issues/1132.
Assigning to @marlitas for consideration in scheduling.