Skip to content

Commit bd4a09e

Browse files
Googleraiuto
Googler
authored andcommitted
Automated rollback of commit 59e51fe.
*** Reason for rollback *** Breaking CI projects *** Original change description *** Flip default value of incompatible_remove_rule_name_parameter RELNOTES[INC]: name parameter is removed from rule call (bazelbuild#16301) PiperOrigin-RevId: 477230070 Change-Id: I44b526271d9f355ab6562c0d4781adf3097c5e3b
1 parent 012c3a7 commit bd4a09e

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public final class BuildLanguageOptions extends OptionsBase {
7070

7171
@Option(
7272
name = "incompatible_remove_rule_name_parameter",
73-
defaultValue = "true",
73+
defaultValue = "false",
7474
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
7575
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
7676
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
@@ -724,7 +724,7 @@ public StarlarkSemantics toStarlarkSemantics() {
724724
public static final String INCOMPATIBLE_STOP_EXPORTING_LANGUAGE_MODULES =
725725
"-incompatible_stop_exporting_language_modules";
726726
public static final String INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER =
727-
"+incompatible_remove_rule_name_parameter";
727+
"-incompatible_remove_rule_name_parameter";
728728
public static final String INCOMPATIBLE_DISALLOW_SYMLINK_FILE_TO_DIR =
729729
"+incompatible_disallow_symlink_file_to_dir";
730730
public static final String EXPERIMENTAL_ALLOW_TAGS_PROPAGATION =

src/test/java/com/google/devtools/build/lib/starlark/StarlarkRuleClassFunctionsTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ public void testExportAliasedName() throws Exception {
947947

948948
@Test
949949
public void testExportWithSpecifiedName() throws Exception {
950-
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
951950
evalAndExport(
952951
ev, //
953952
"def _impl(ctx): pass",
@@ -962,7 +961,6 @@ public void testExportWithSpecifiedName() throws Exception {
962961

963962
@Test
964963
public void testExportWithSpecifiedNameFailure() throws Exception {
965-
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
966964
ev.setFailFast(false);
967965

968966
evalAndExport(
@@ -975,7 +973,6 @@ public void testExportWithSpecifiedNameFailure() throws Exception {
975973

976974
@Test
977975
public void testExportWithNonStringNameFailsCleanly() throws Exception {
978-
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
979976
ev.setFailFast(false);
980977

981978
evalAndExport(
@@ -988,7 +985,6 @@ public void testExportWithNonStringNameFailsCleanly() throws Exception {
988985

989986
@Test
990987
public void testExportWithMultipleErrors() throws Exception {
991-
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
992988
ev.setFailFast(false);
993989

994990
evalAndExport(

src/test/java/com/google/devtools/build/skydoc/SkydocTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.google.common.collect.ImmutableMap;
2323
import com.google.common.collect.ImmutableSet;
2424
import com.google.common.collect.Iterables;
25-
import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
25+
import com.google.devtools.build.lib.analysis.util.BuildViewTestCase; // a bad dependency!
2626
import com.google.devtools.build.lib.cmdline.Label;
2727
import com.google.devtools.build.lib.packages.semantics.BuildLanguageOptions;
2828
import com.google.devtools.build.lib.vfs.FileSystemUtils;
@@ -267,9 +267,7 @@ public void testRuleExportedWithSpecifiedName() throws Exception {
267267

268268
Module unused =
269269
skydocMain.eval(
270-
StarlarkSemantics.builder()
271-
.setBool(BuildLanguageOptions.INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER, false)
272-
.build(),
270+
StarlarkSemantics.DEFAULT,
273271
Label.parseAbsoluteUnchecked("//test:test.bzl"),
274272
ruleInfoMap,
275273
ImmutableMap.builder(),
@@ -296,9 +294,7 @@ public void testUnassignedRuleNotDocumented() throws Exception {
296294

297295
Module unused =
298296
skydocMain.eval(
299-
StarlarkSemantics.builder()
300-
.setBool(BuildLanguageOptions.INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER, false)
301-
.build(),
297+
StarlarkSemantics.DEFAULT,
302298
Label.parseAbsoluteUnchecked("//test:test.bzl"),
303299
ruleInfoMap,
304300
ImmutableMap.builder(),

0 commit comments

Comments
 (0)