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
Bug: repeated lints in the same process run out of memory #6462
Comments
Okay - so I think I understand the problems. First - the Second - you're using Fun little extra thing - you can add In "normal" mode we'll create a watch compiler host and builder program, which is super slow for various reasons. We do this so we can efficiently handle the IDE usecase, but it sucks for the CLI / "one and done" usecase. In "single run" mode we'll directly create a |
1. typescript-eslint memory usage workaround provided by @bradzacher in typescript-eslint/typescript-eslint#6462. Clear caches after each run so that ts.Program objects aren't retained forever. 2. typescript-eslint speedup provided the same way. Avoid constructing some objects that are only needed for editors. 3. Add yet another jsdoc tag to no-redundant-jsdoc2 4. Correct and reduce amount of perf-related printing at end of ExpectRule. The correction is needed now that ExpectRule saves the equivalent of --extendedDiagnostics after running; I changed the name of the properties to match.
* typescript-eslint workaround + misc fixes 1. typescript-eslint memory usage workaround provided by @bradzacher in typescript-eslint/typescript-eslint#6462. Clear caches after each run so that ts.Program objects aren't retained forever. 2. typescript-eslint speedup provided the same way. Avoid constructing some objects that are only needed for editors. 3. Add yet another jsdoc tag to no-redundant-jsdoc2 4. Correct and reduce amount of perf-related printing at end of ExpectRule. The correction is needed now that ExpectRule saves the equivalent of --extendedDiagnostics after running; I changed the name of the properties to match. * fix semicolon lint
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
Expected: Repro should finish, printing memory usage that stays roughly about the same.
Actual: Memory usage grows throughout the run until the VM runs out of memory.
This happens even with all .eslintrc.json rules turned off, as long as typescript-eslint is specified as eslint's parser.
Probably related to #1192
Reproduction Repository Link
https://github.com/sandersn/ts-eslint-oom
Repro Steps
repros
:At least, I'm pretty sure a shallow clone will work here.
Yes, there is no package-lock.
npm ci
node index.js
2a. Optionally, delete all the rules in .eslintrc.json, since that shows that the problem is from typescript-eslint and not the rules. You may also need to delete all the override .eslintrc.jsons in subfolders.
ts-eslint-oom loops over every folder in DefinitelyTyped/types and calls eslint on it. The config at DT root specifies typescript-eslint as the parser.
Versions
@typescript-eslint/eslint-plugin
5.52.0
@typescript-eslint/parser
5.52.0
@typescript-eslint/utils
5.52.0
ESLint
8.34.0
node
18
or16
The text was updated successfully, but these errors were encountered: