Skip to content

JavaScript: Remove unused SEMMLE_TYPESCRIPT_MEMORY_THRESHOLD - #22887

Merged
paldepind merged 1 commit into
mainfrom
js/remove-envvar
Oct 26, 2026
Merged

paldepind merged 1 commit into
mainfrom
js/remove-envvar

Conversation

@paldepind

@paldepind paldepind commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

b0062cf removed reloading the TypeScript server in the TypeScript extractor that was dead code since we stopped extracting types (I think).

Following that, this PR:

  • Removes SEMMLE_TYPESCRIPT_MEMORY_THRESHOLD in the Java extractor-side as the env var is now unused. This is the last reference to that envvar.
  • Removes claims in documentation about restarting the TypeScript compiler, as that's no longer accurate.
  • Changes documented defaults since they don't match behavior.

To see the value of the defaults: setupParserWrapper() reads TYPESCRIPT_RAM with a default of 2000 MB and TYPESCRIPT_RAM_RESERVE with a default of 400 MB. Below the Node.js invocation sets --max_old_space_size to mainMemoryMb + reserveMemoryMb: 2000 + 400 = 2400 MB by default.

@github-actions github-actions Bot added the JS label Oct 26, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ed06a454-bbdc-4586-8a7c-a7bc93c59413
@paldepind
paldepind marked this pull request as ready for review October 26, 2026 06:44
@paldepind
paldepind requested review from a team as code owners October 26, 2026 06:44
Copilot AI max review requested due to automatic review settings October 26, 2026 06:44
@paldepind paldepind changed the title JavaScript: remove unused TypeScript memory threshold wiring JavaScript: Remove unused SEMMLE_TYPESCRIPT_MEMORY_THRESHOLD Oct 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The cleanup removes unused wiring and corrects documentation without changing heap sizing or parser behavior.

No open issues 🎉

What changed in this PR

Removes obsolete TypeScript memory-threshold wiring from the JavaScript extractor and updates documentation to match existing heap limits.

Changes:

  • Stops setting the unused SEMMLE_TYPESCRIPT_MEMORY_THRESHOLD environment variable.
  • Documents the 2000 MB default plus 400 MB reserve and removes outdated compiler-restart claims.
File Description
javascript/​extractor/​src/​com/​semmle/​ts/​extractor/​TypeScriptParser.java Removes unused environment wiring and corrects memory-setting documentation.

Review effort: Max

@paldepind
paldepind merged commit 079a05f into main Oct 26, 2026
18 checks passed
@paldepind
paldepind deleted the js/remove-envvar branch October 26, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants