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

@types/reactstrap@8.0.0 runs out of memory on TS 3.4 #30973

Closed
sandersn opened this issue Apr 16, 2019 · 7 comments
Closed

@types/reactstrap@8.0.0 runs out of memory on TS 3.4 #30973

sandersn opened this issue Apr 16, 2019 · 7 comments
Assignees
Labels
Bug A bug in TypeScript

Comments

@sandersn
Copy link
Member

  1. clone DefinitelyTyped
  2. cd types/lodash, types/reactstrap, types/reactstrap/v7
  3. tsc

For tsc 3.4.3 and above (and probably all 3.4.x)

Expected behavior:
No unexpected errors.

Actual behavior:
node runs out of memory.

This might be an unavoidable effect of the additional work that we do in 3.4 and above, but in that case, those three packages (at least) need to be rewritten to be more efficient.

@sandersn
Copy link
Member Author

After cleaning node_modules on DefinitelyTyped, lodash passes.
On windows, reactstrap also doesn't repro -- it uses over 1500 MB of memory before succeeding though.

@sandersn sandersn changed the title lodash and reactstrap run out of memory on TS 3.4 From Definitely Typed, reactstrap runs out of memory on TS 3.4 Apr 16, 2019
@sandersn
Copy link
Member Author

reactstrap is now much smaller after some changes I made. For this bug, use 8.0.0, not 8.0.1 (or higher).

@sandersn
Copy link
Member Author

Selection_025
Here's the performance of lodash over the 3.4 release, as measured by type count. The explosion was on 02/27, with only minor differences before and after. I'll bisect to find the exact commit.

@sandersn sandersn changed the title From Definitely Typed, reactstrap runs out of memory on TS 3.4 @types/reactstrap@8.0.0 runs out of memory on TS 3.4 Apr 18, 2019
@sandersn
Copy link
Member Author

sandersn commented Apr 18, 2019

#29981 is the culprit here.
Edit: After talking to @weswigham the problem is probably that variance probing no longer applies to lodash as a whole and we end up doing a structural check now.

@weswigham
Copy link
Member

@sandersn does #30416 fix that OOM? (I triggered a package build on it after making some small adjustments so it can be tested against)

@sandersn
Copy link
Member Author

Fixes lodash -- 485k → 85k types. (vs 83k on 3.3)
Fixes reactstrap 8.0.0, basically -- 1538k → 591k types (vs 493k on 3.3)

@sandersn
Copy link
Member Author

This is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants
@sandersn @weswigham @RyanCavanaugh and others