You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a repeated field listing acceptable values for enum flags (e.g. "pretty_print" for subcommands)
a map field listing the flags/values an expansion argument expands to (e.g. { "test_arg": "--wrapper_script_flag=--debug" "test_output": "streamed", "test_strategy": "exclusive", "test_timeout": "9999", "nocache_test_results": "1" }
Which category does this issue belong to?
CLI
What underlying problem are you trying to solve with this feature?
There is currently no way to determine, using only the flag proto, whether a flag that has_negative_flag is being passed a valid value as its argument, since it is possible such a flag accepts an enum.
There is currently no way to determine, using only the flag proto, whether an enum flag is being passed a valid value, since there is neither any way to determine which flags are enums nor any way to determine what the valid values of such a flag might be.
Currently, expansion flags can be identified using only the flag proto, as they are the only flags for which both the has_negative_flag and requires_value fields are false. However, they cannot be expanded, and thus canonicalization of a set of flags using only the flag proto may include flags that are superseded by later expansion flags, which is not ideal.
For context, my current goal is to use help flags-as-proto output to parse the arguments passed to a bazel command, detect trivial problems, and canonicalize the arguments passed in.
Which operating system are you running Bazel on?
debian trixie
What is the output of bazel info release?
release 8.0.1
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Have you found anything relevant by searching the web?
I found that there are boolean-like flags that also accept enum values via BoolOrEnumConverter.
I found that there are currently 21 expansion options in bazel:
If the expansions are added to the proto, I can support these 21 manually in order to be compatible with older versions of bazel, and then support any expansion options added in the future dynamically using the proto.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered:
Description of the feature request:
I would like to add:
"pretty_print"
forsubcommands
){ "test_arg": "--wrapper_script_flag=--debug" "test_output": "streamed", "test_strategy": "exclusive", "test_timeout": "9999", "nocache_test_results": "1" }
Which category does this issue belong to?
CLI
What underlying problem are you trying to solve with this feature?
There is currently no way to determine, using only the flag proto, whether a flag that
has_negative_flag
is being passed a valid value as its argument, since it is possible such a flag accepts an enum.There is currently no way to determine, using only the flag proto, whether an enum flag is being passed a valid value, since there is neither any way to determine which flags are enums nor any way to determine what the valid values of such a flag might be.
Currently, expansion flags can be identified using only the flag proto, as they are the only flags for which both the
has_negative_flag
andrequires_value
fields are false. However, they cannot be expanded, and thus canonicalization of a set of flags using only the flag proto may include flags that are superseded by later expansion flags, which is not ideal.For context, my current goal is to use
help flags-as-proto
output to parse the arguments passed to a bazel command, detect trivial problems, and canonicalize the arguments passed in.Which operating system are you running Bazel on?
debian trixie
What is the output of
bazel info release
?release 8.0.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?Have you found anything relevant by searching the web?
I found that there are boolean-like flags that also accept enum values via
BoolOrEnumConverter
.I found that there are currently 21 expansion options in bazel:
If the expansions are added to the proto, I can support these 21 manually in order to be compatible with older versions of bazel, and then support any expansion options added in the future dynamically using the proto.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: