| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@joyeecheung build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/2496/pipeline |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm wondering if keeping this in JS is worth it, because that makes it more accessible to people? I realize it's slower, but we encourage people to write the output to a file anyway, so I wouldn't do this for performance reasons
Sorry, something went wrong.
There was a problem hiding this comment.
This could also be a member of OptionsParser, right?
Sorry, something went wrong.
There was a problem hiding this comment.
It can, but so is GetOptions() so I figured it's better to keep them consistent
Sorry, something went wrong.
|
@addaleax IMO it is an overkill to implement --bash-completion in JS, and being in JS does not necessarily mean it's more accessible. This flag essentially just formats structured data from the binary into a string and prints it to stdout, there is no user input or error handling necessary. Implementing it in JS means it has to depend on a working v8 isolate and an Environment, and rely on proper serialization of a complicated v8::Object as well as a working stdout stream, those are all too complicated for a simple feature like --bash-completion. (In fact to remove [has_eval_string] and [ssl_openssl_cert_store] my first action was to debug GetOptions() since that's where all the complexities were, it was much easier to debug the loop in GetBashCompletion() to be honest, so moving the formatting in JS did not really make the implementation any more accessible if the source of data is in C++) Being handled later in time (after bootstrap/node.js instead of directly in node::Init) also means that there is a mental burden when we add branches in the bootstrap (e.g. node-report) even though they do not really make sense for --bash-completion so we might as well just deal with it earlier and focus on cases that are more common in the bootstrap process - this is also the case for things like node --version. |
Sorry, something went wrong.
|
@addaleax: is your comment in #25901 (review) blocking? |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
So that it gets handle earlier and faster during the bootstrap process. Drive-by fixes: - Remove `[has_eval_string]` and `[ssl_openssl_cert_store]` from the completion output - Set `kProfProcess` execution mode for `--prof-process` instead of `kPrintBashProcess` which is removed in this patch. - Append new line to the end of the output of --bash-completion
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
@joyeecheung Since you pinged me – the code changes look good to me, but I’d still have a mild preference to keep this in JS because that does seem to be less complex to me. But as far as I’m concerned, this PR is ready to land 👍 (I can’t make out what the Windows failure is, so I’ll just start a resume CI…) |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
So that it gets handle earlier and faster during the bootstrap process. Drive-by fixes: - Remove `[has_eval_string]` and `[ssl_openssl_cert_store]` from the completion output - Set `kProfProcess` execution mode for `--prof-process` instead of `kPrintBashProcess` which is removed in this patch. - Append new line to the end of the output of --bash-completion PR-URL: #25901 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
So that it gets handle earlier and faster during the bootstrap process. Drive-by fixes: - Remove `[has_eval_string]` and `[ssl_openssl_cert_store]` from the completion output - Set `kProfProcess` execution mode for `--prof-process` instead of `kPrintBashProcess` which is removed in this patch. - Append new line to the end of the output of --bash-completion PR-URL: #25901 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
So that it gets handle earlier and faster during the bootstrap process. Drive-by fixes: - Remove `[has_eval_string]` and `[ssl_openssl_cert_store]` from the completion output - Set `kProfProcess` execution mode for `--prof-process` instead of `kPrintBashProcess` which is removed in this patch. - Append new line to the end of the output of --bash-completion PR-URL: #25901 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
So that it gets handle earlier and faster during the bootstrap process. Drive-by fixes: - Remove `[has_eval_string]` and `[ssl_openssl_cert_store]` from the completion output - Set `kProfProcess` execution mode for `--prof-process` instead of `kPrintBashProcess` which is removed in this patch. - Append new line to the end of the output of --bash-completion PR-URL: #25901 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
So that it gets handle earlier and faster during the bootstrap
process.
Drive-by fixes:
the completion output
Before:
After:
Checklist