Module caching memory leak
## π Bug Report <!-- A clear and concise description of what the bug is. --> `ts-jest` seems to cache compiled modules over and over again, creating a memory leak. There is a basline suite of tests using just `jest` on [`main`](https://github.com/willsoto/jest-repro) ## To Reproduce Steps to reproduce the behavior: 1. `git clone git@github.com:willsoto/jest-repro.git` (note the branch is `ts-jest-memory-leak`) 2. `npm ci` 3. Run any of the [test scripts](https://github.com/willsoto/jest-repro/blob/ts-jest-memory-leak/package.json#L7-L9) to see memory usage increasing in a way that is indicative of a memory leak. You can run [`npm run test:force-gc`](https://github.com/willsoto/jest-repro/blob/ts-jest-memory-leak/package.json#L10) to see memory usage when a garbage collection is forced. ## Expected behavior <!-- A clear and concise description of what you expected to happen. --> Modules should be cached once for the duration of the test run or allowed to be garbage collected after the test suite has completed. ## Link to repo (highly encouraged) <!-- Please provide either a minimal repository either on GitHub or GitLab. Issues without a reproduction link are likely to stall. --> https://github.com/willsoto/jest-repro/tree/ts-jest-memory-leak ## Debug log: <!-- You can activate the debug logger by setting the environment variable TS_JEST_LOG=ts-jest.log before running tests. The output of the logger will be in **ts-jest.log** in CWD, paste it in the below section:
Posted by willsoto on Sep 18, 2020, 5:04 PM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default β ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default β ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
Module caching memory leak
## π Bug Report <!-- A clear and concise description of what the bug is. --> `ts-jest` seems to cache compiled modules over and over again, creating a memory leak. There is a basline suite of tests using just `jest` on [`main`](https://github.com/willsoto/jest-repro) ## To Reproduce Steps to reproduce the behavior: 1. `git clone git@github.com:willsoto/jest-repro.git` (note the branch is `ts-jest-memory-leak`) 2. `npm ci` 3. Run any of the [test scripts](https://github.com/willsoto/jest-repro/blob/ts-jest-memory-leak/package.json#L7-L9) to see memory usage increasing in a way that is indicative of a memory leak. You can run [`npm run test:force-gc`](https://github.com/willsoto/jest-repro/blob/ts-jest-memory-leak/package.json#L10) to see memory usage when a garbage collection is forced. ## Expected behavior <!-- A clear and concise description of what you expected to happen. --> Modules should be cached once for the duration of the test run or allowed to be garbage collected after the test suite has completed. ## Link to repo (highly encouraged) <!-- Please provide either a minimal repository either on GitHub or GitLab. Issues without a reproduction link are likely to stall. --> https://github.com/willsoto/jest-repro/tree/ts-jest-memory-leak ## Debug log: <!-- You can activate the debug logger by setting the environment variable TS_JEST_LOG=ts-jest.log before running tests. The output of the logger will be in **ts-jest.log** in CWD, paste it in the below section:
Comments (0)
No comments yet. Start the discussion.