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

added ability to pass node_args to forked process #697

Closed
wants to merge 1 commit into from

Conversation

rkoval
Copy link

@rkoval rkoval commented Dec 31, 2018

Hello!

I haven't been using this plugin very long because there hasn't been JavaScript support until very recently, but so far it is excellent. However, I was running into issues with tsserver running out of heap memory (I'm using it on a large project). I was able to fix it by just upping the heap size with --max-old-space-size, so I wanted to extend the plugin to be able to support any arbitrary arguments to pass to the node process. I believe this PR does it in a pretty succinct and usable way, though please let me know if I should make any tweaks.

Thanks!

@msftclas
Copy link

msftclas commented Dec 31, 2018

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ rkoval sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

@roblav96
Copy link

roblav96 commented Jan 6, 2019

@rkoval
You can also set this via an environment variable like so:

# ~/.bashrc
export NODE_OPTIONS=--max_old_space_size=1024

@rkoval
Copy link
Author

rkoval commented Jan 6, 2019

@roblav96 Ooh nice tip! Is there an option within this plugin that will allow that env var to be scoped only to this plugin's node invocation? I don't want that to be globally in my .bashrc such that it applies to every node process that I spawn.

@roblav96
Copy link

@rkoval When you launch sublime from the terminal, NODE_OPTIONS=--max_old_space_size=1024 subl -w ~/Project/main.ts, I certainly wouldn't worry about throwing it in your .bashrc, unless your node.js API projects have some major memory leaks, then you've got a whole other problem lol

@orta
Copy link
Contributor

orta commented Sep 11, 2019

@rkoval - this can't be merged until the CLA is accepted ( see #697 (comment) )

Otherwise, feels reasonable to me

@rkoval
Copy link
Author

rkoval commented Sep 11, 2019

feel free to close then. i'm not interested in signing the CLA for such a small change. feel free to create this change on another PR though

@orta
Copy link
Contributor

orta commented Sep 12, 2019

Cool, I'll leave that for someone interested in the feature to do 👍

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

Successfully merging this pull request may close these issues.

4 participants