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

createRpcWorker should not override execArgv #845

Open
mook-as opened this issue Jun 6, 2024 · 1 comment
Open

createRpcWorker should not override execArgv #845

mook-as opened this issue Jun 6, 2024 · 1 comment
Labels

Comments

@mook-as
Copy link

mook-as commented Jun 6, 2024

Current behavior

I have a project that seems to blow up TypeScript because there are too many generics involved; I have to build it with node --stack-size=… so that the stack is big enough.

Note that it appears that NodeJS does not allow setting this option via NODE_OPTIONS.

However, rpc-worker#createRpcWorker currently clobbers options.execArgv if a memory limit is set, which it always is. This means that I can't pass it in on the command line.

Expected behavior

The relevant line:

options.execArgv = [`--max-old-space-size=${memoryLimit}`];

It would be nice if that's something along the lines of:

    options.execArgv = process.execArgv.concat([`--max-old-space-size=${memoryLimit}`]);

Steps to reproduce the issue

I suppose the easiest would be:

  1. Launch webpack with --stack-size=… arguments.
  2. Check ps output (or equivalent) to see that the TypeScriptReporterRpcService.js processes do not have --stack-size=… in the command line. (They have --max-old-space-size=2048 instead.)

Issue reproduction repository

Sorry, I don't have a minimal test case; hopefully I have provided enough information to be clear what the issue is.

Environment

  • fork-ts-checker-webpack-plugin: 6.5.3
  • typescript: 5.4.5
  • eslint: 8.57.0
  • webpack: 5.91.0
  • os: macOS Ventura 13.6
@piotr-oles
Copy link
Collaborator

That make sense, feel free to open a PR :)

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

No branches or pull requests

2 participants