Skip to content

Commit

Permalink
Automated rollback of commit 59e51fe.
Browse files Browse the repository at this point in the history
*** 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 (#16301)

PiperOrigin-RevId: 477230070
Change-Id: I44b526271d9f355ab6562c0d4781adf3097c5e3b
  • Loading branch information
Googler authored and copybara-github committed Sep 27, 2022
1 parent 48049b7 commit 901c75e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public final class BuildLanguageOptions extends OptionsBase {

@Option(
name = "incompatible_remove_rule_name_parameter",
defaultValue = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
Expand Down Expand Up @@ -724,7 +724,7 @@ public StarlarkSemantics toStarlarkSemantics() {
public static final String INCOMPATIBLE_STOP_EXPORTING_LANGUAGE_MODULES =
"-incompatible_stop_exporting_language_modules";
public static final String INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER =
"+incompatible_remove_rule_name_parameter";
"-incompatible_remove_rule_name_parameter";
public static final String INCOMPATIBLE_DISALLOW_SYMLINK_FILE_TO_DIR =
"+incompatible_disallow_symlink_file_to_dir";
public static final String EXPERIMENTAL_ALLOW_TAGS_PROPAGATION =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ public void testExportAliasedName() throws Exception {

@Test
public void testExportWithSpecifiedName() throws Exception {
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
evalAndExport(
ev, //
"def _impl(ctx): pass",
Expand All @@ -962,7 +961,6 @@ public void testExportWithSpecifiedName() throws Exception {

@Test
public void testExportWithSpecifiedNameFailure() throws Exception {
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
ev.setFailFast(false);

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

@Test
public void testExportWithNonStringNameFailsCleanly() throws Exception {
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
ev.setFailFast(false);

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

@Test
public void testExportWithMultipleErrors() throws Exception {
setBuildLanguageOptions("--noincompatible_remove_rule_name_parameter");
ev.setFailFast(false);

evalAndExport(
Expand Down
10 changes: 3 additions & 7 deletions src/test/java/com/google/devtools/build/skydoc/SkydocTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
import com.google.devtools.build.lib.analysis.util.BuildViewTestCase; // a bad dependency!
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.packages.semantics.BuildLanguageOptions;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
Expand Down Expand Up @@ -267,9 +267,7 @@ public void testRuleExportedWithSpecifiedName() throws Exception {

Module unused =
skydocMain.eval(
StarlarkSemantics.builder()
.setBool(BuildLanguageOptions.INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER, false)
.build(),
StarlarkSemantics.DEFAULT,
Label.parseAbsoluteUnchecked("//test:test.bzl"),
ruleInfoMap,
ImmutableMap.builder(),
Expand All @@ -296,9 +294,7 @@ public void testUnassignedRuleNotDocumented() throws Exception {

Module unused =
skydocMain.eval(
StarlarkSemantics.builder()
.setBool(BuildLanguageOptions.INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER, false)
.build(),
StarlarkSemantics.DEFAULT,
Label.parseAbsoluteUnchecked("//test:test.bzl"),
ruleInfoMap,
ImmutableMap.builder(),
Expand Down

0 comments on commit 901c75e

Please sign in to comment.