Skip to content
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

Compiler OOM on strict generic checks #19662

Closed
mhegazy opened this issue Nov 1, 2017 · 6 comments
Closed

Compiler OOM on strict generic checks #19662

mhegazy opened this issue Nov 1, 2017 · 6 comments
Assignees
Labels
Bug A bug in TypeScript Needs More Info The issue still hasn't been fully clarified

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Nov 1, 2017

Reported in #18411 (comment)

Project: https://github.com/electricessence/TypeScript.NET

The project compiles in Webstorm for the existing tsconfigs with 2.7. But I'm dependent on gulp to render my distributions and run tests. The area where it gets problematic is in /source/System.Linq where the Linq.ts lib tries to reconcile the extensive interface signature. If I rip out the guts of the interface, it will compile (although still quite slowly relative to 2.3.2)

Note: --noStrictGenericChecks seems to avoid the crash.

@electricessence
Copy link

Unless gulp-typescript changed something where passing noStrictGenericChecks: true to the options doesn't work, then I'm still getting the error.

typescript@2.7.0-dev.20171104
Compilation is taking quite a long time before failing.

Just for reference, here is where the options block is passed through my build process:
https://github.com/electricessence/gulp-typescript-helper/blob/master/source/BuildHelper.ts#L59
I see no reason why it wouldn't be working though since it's been reliable through 2.3.2.

I may have to just wait for a fix.

@mhegazy mhegazy added this to the TypeScript 2.7 milestone Nov 6, 2017
@sandersn sandersn added this to Not started in Rolling Work Tracking Nov 8, 2017
@electricessence
Copy link

electricessence commented Nov 24, 2017

Ok so this officially has be come a serious issue. (related #20251)

TS 2.6.0 will allow me to add:

readonly [Symbol.toStringTag]: "Promise";

But TS 2.3.2 will not. And 2.3.2 is the latest version that will compile my code successfully.
Apparently TS 2.3.2 does not understand Symbol. Or more correctly, it can't be made to understand .toStringTag.
If I try to hack either version make both happy, they disagree.

@aldendaniels
Copy link

Process is running out out of memory on TS 2.6.2 when running

tsc --noemit --watch --project .

I also tried

tsc --noemit --watch --noStrictGenerics --project .

As recommended in #18411, but no dice.

Non-watch mode and the IDE interface are OK.

@mhegazy
Copy link
Contributor Author

mhegazy commented Jan 10, 2018

@aldendaniels can you share your project

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Jan 19, 2018
@mhegazy
Copy link
Contributor Author

mhegazy commented Mar 9, 2018

Closing for now. please reopen if a sample exists.

@mhegazy mhegazy closed this as completed Mar 9, 2018
@electricessence
Copy link

This is how I ended up fixing my problems:
#21048

@sandersn helped me through and also had me mark a checkin where it's repoable.

@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Needs More Info The issue still hasn't been fully clarified
Projects
Rolling Work Tracking
  
Not started
Development

No branches or pull requests

4 participants