Skip to content

Commit

Permalink
Remove warnings about ignored starlark options
Browse files Browse the repository at this point in the history
Neither clean nor info really make sense to have semantics changed from starlark flags, but if you have a starlark flag in your .bazelrc in the `build` section you see this warning.

Closes bazelbuild#16616.

PiperOrigin-RevId: 490301831
Change-Id: I659aad203cba36f7a69d92101f8fc1817b14f99a
  • Loading branch information
keith authored and copybara-github committed Nov 22, 2022
1 parent 45197b7 commit b564d14
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,7 @@ public CleanCommand(OS os) {
@Override
public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult options) {
// Assert that there is no residue and warn about Starlark options.
List<String> starlarkOptions = options.getSkippedArgs();
List<String> residue = options.getResidue();
if (!starlarkOptions.isEmpty()) {
env.getReporter()
.handle(
Event.warn(
"Blaze clean does not support starlark options. Ignoring options: "
+ starlarkOptions));
}
if (!residue.isEmpty()) {
String message = "Unrecognized arguments: " + Joiner.on(' ').join(residue);
env.getReporter().handle(Event.error(message));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,7 @@ public BlazeCommandResult exec(
}
}

List<String> starlarkOptions = optionsParsingResult.getSkippedArgs();
List<String> residue = optionsParsingResult.getResidue();
if (!starlarkOptions.isEmpty()) {
env.getReporter()
.handle(
Event.warn(
"info command does not support starlark options. Ignoring options: "
+ starlarkOptions));
}

env.getEventBus().post(new NoBuildEvent());
if (!residue.isEmpty()) {
ImmutableSet.Builder<String> unknownKeysBuilder = ImmutableSet.builder();
Expand Down

0 comments on commit b564d14

Please sign in to comment.