From b564d145218e58b0440ffad82b3d1d54eef15d22 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 22 Nov 2022 12:06:25 -0800 Subject: [PATCH] Remove warnings about ignored starlark options 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 #16616. PiperOrigin-RevId: 490301831 Change-Id: I659aad203cba36f7a69d92101f8fc1817b14f99a --- .../build/lib/runtime/commands/CleanCommand.java | 8 -------- .../devtools/build/lib/runtime/commands/InfoCommand.java | 9 --------- 2 files changed, 17 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java index 305f3d5c227ee9..6d9c5965d15576 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java @@ -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 starlarkOptions = options.getSkippedArgs(); List 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)); diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java index 3a1ff782e05c0b..11e465ed23b234 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java @@ -189,16 +189,7 @@ public BlazeCommandResult exec( } } - List starlarkOptions = optionsParsingResult.getSkippedArgs(); List 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 unknownKeysBuilder = ImmutableSet.builder();