Make --no//boolean/starlark/option work by allowing native options parser to skip "--no//" as well as "--//" prefixed args.
The logic was already in the starlark options parser to handle this, but it didn't actually work since any "--no//"-prefixed arg would have thrown an error during native options parsing.
@@ -687,8 +687,12 @@ public class BlazeCommandDispatcher implements CommandDispatcher {
OptionsParser parser =
OptionsParser.builder()
.optionsData(optionsData)
+ // for starlark options
.skippedPrefix("--//")
+ .skippedPrefix("--no//")
+ // for starlark options in other repos
.skippedPrefix("--@")
+ .skippedPrefix("--no@")
.allowResidue(annotation.allowResidue())
.build();
return parser;
