I use nodejs to run javascript code in my application. And I have found that after running script from code, script from file will not run. It is caused by unpredicted value of eval_string static variable, that was not set to nullptr at previous run, and bootstrap tries to run code instead of file. Also I think, some other static variables can interrupt running scripts too.
As mentioned in https://github.com/nodejs/help/issues/1367, this probably requires us to introduce a proper options parse/options management system.
@addaleax Not sure, what sort of help is needed here. But it would be great, if you can say what needs to be done (looks like its going to be a long list though) and will see if I can provide some help on it. Thanks!
@antoaravinth Yes, it’s not going to be a short thing – this probably takes a long time to fully figure out, and it’s mostly C++ work.
I think the roadmap would look something like this:
--preserve-symlinks), per-Isolate (e.g. `), per-Thread, per-Process. I’m happy to help as well as I can, but yes, it’s going to be a bunch of work.
Thanks @addaleax for the response. Looks interesting, but unfortunately, I don't have good grasp on C++, so I can't help on that part. If anything that needs to be done from JS side, sure I'm ready to help here 👍
Yeah, I’m sorry I only realized now that I should probably mentioned that this is a C++-heavy thing. :D
@addaleax I'm new to contributing but I would like to help out with the C++ issue. Is anyone working on this right now? I see @Let0s when I followed his reference link it seems Let0s is already coming up with a solution.
@ryansaam There’s #22192, which you probably want to read for context. It should be quite a bit easier to do this properly now, but still requires some thought on the exact shape of the API.
I think that, eventually, we want a number of changes to the public API:
ProcessArgv() from node.ccProcessArgv() also does some other things besides options parsing, like interpreting errors from there, etc.ProcessArgv() do when it receives --v8-options? Should it still exit the process? Should it tell the caller to do so?Environment* orIsolateData*` parameter, respectively(Also, ping @danbev in case you have any ideas here.)
Is there any work pending in this issue, i could work on this.
@addaleax ... given that node_options exists now... is this done?
Most helpful comment
Yeah, I’m sorry I only realized now that I should probably mentioned that this is a C++-heavy thing. :D