-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: port --bash-completion to C++ #25901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -400,6 +401,7 @@ class OptionsParser { | |||
friend class OptionsParser; | |||
|
|||
friend void GetOptions(const v8::FunctionCallbackInfo<v8::Value>& args); | |||
friend std::string GetBashCompletion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be a member of OptionsParser
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can, but so is GetOptions()
so I figured it's better to keep them consistent
@addaleax IMO it is an overkill to implement Being handled later in time (after |
@addaleax: is your comment in #25901 (review) blocking? |
@joyeecheung No, it’s not :) |
@joyeecheung this needs a rebase |
Ping @joyeecheung |
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
@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…) |
ping @joyeecheung |
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 403c84a 🎉 |
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that it gets handle earlier and faster during the bootstrap
process.
Drive-by fixes:
[has_eval_string]
and[ssl_openssl_cert_store]
fromthe completion output
Before:
After:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes