Commit b05c3a0 1 parent f36a8f8 commit b05c3a0 Copy full SHA for b05c3a0
File tree 3 files changed +13
-5
lines changed
main/java/com/google/devtools/build/lib/packages/semantics
test/java/com/google/devtools/build
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public final class BuildLanguageOptions extends OptionsBase {
70
70
71
71
@ Option (
72
72
name = "incompatible_remove_rule_name_parameter" ,
73
- defaultValue = "false " ,
73
+ defaultValue = "true " ,
74
74
documentationCategory = OptionDocumentationCategory .UNCATEGORIZED ,
75
75
effectTags = {OptionEffectTag .LOADING_AND_ANALYSIS },
76
76
metadataTags = {OptionMetadataTag .INCOMPATIBLE_CHANGE },
@@ -724,7 +724,7 @@ public StarlarkSemantics toStarlarkSemantics() {
724
724
public static final String INCOMPATIBLE_STOP_EXPORTING_LANGUAGE_MODULES =
725
725
"-incompatible_stop_exporting_language_modules" ;
726
726
public static final String INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER =
727
- "- incompatible_remove_rule_name_parameter" ;
727
+ "+ incompatible_remove_rule_name_parameter" ;
728
728
public static final String INCOMPATIBLE_DISALLOW_SYMLINK_FILE_TO_DIR =
729
729
"+incompatible_disallow_symlink_file_to_dir" ;
730
730
public static final String EXPERIMENTAL_ALLOW_TAGS_PROPAGATION =
Original file line number Diff line number Diff line change @@ -947,6 +947,7 @@ public void testExportAliasedName() throws Exception {
947
947
948
948
@ Test
949
949
public void testExportWithSpecifiedName () throws Exception {
950
+ setBuildLanguageOptions ("--noincompatible_remove_rule_name_parameter" );
950
951
evalAndExport (
951
952
ev , //
952
953
"def _impl(ctx): pass" ,
@@ -961,6 +962,7 @@ public void testExportWithSpecifiedName() throws Exception {
961
962
962
963
@ Test
963
964
public void testExportWithSpecifiedNameFailure () throws Exception {
965
+ setBuildLanguageOptions ("--noincompatible_remove_rule_name_parameter" );
964
966
ev .setFailFast (false );
965
967
966
968
evalAndExport (
@@ -973,6 +975,7 @@ public void testExportWithSpecifiedNameFailure() throws Exception {
973
975
974
976
@ Test
975
977
public void testExportWithNonStringNameFailsCleanly () throws Exception {
978
+ setBuildLanguageOptions ("--noincompatible_remove_rule_name_parameter" );
976
979
ev .setFailFast (false );
977
980
978
981
evalAndExport (
@@ -985,6 +988,7 @@ public void testExportWithNonStringNameFailsCleanly() throws Exception {
985
988
986
989
@ Test
987
990
public void testExportWithMultipleErrors () throws Exception {
991
+ setBuildLanguageOptions ("--noincompatible_remove_rule_name_parameter" );
988
992
ev .setFailFast (false );
989
993
990
994
evalAndExport (
Original file line number Diff line number Diff line change 22
22
import com .google .common .collect .ImmutableMap ;
23
23
import com .google .common .collect .ImmutableSet ;
24
24
import com .google .common .collect .Iterables ;
25
- import com .google .devtools .build .lib .analysis .util .BuildViewTestCase ; // a bad dependency!
25
+ import com .google .devtools .build .lib .analysis .util .BuildViewTestCase ;
26
26
import com .google .devtools .build .lib .cmdline .Label ;
27
27
import com .google .devtools .build .lib .packages .semantics .BuildLanguageOptions ;
28
28
import com .google .devtools .build .lib .vfs .FileSystemUtils ;
@@ -267,7 +267,9 @@ public void testRuleExportedWithSpecifiedName() throws Exception {
267
267
268
268
Module unused =
269
269
skydocMain .eval (
270
- StarlarkSemantics .DEFAULT ,
270
+ StarlarkSemantics .builder ()
271
+ .setBool (BuildLanguageOptions .INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER , false )
272
+ .build (),
271
273
Label .parseAbsoluteUnchecked ("//test:test.bzl" ),
272
274
ruleInfoMap ,
273
275
ImmutableMap .builder (),
@@ -294,7 +296,9 @@ public void testUnassignedRuleNotDocumented() throws Exception {
294
296
295
297
Module unused =
296
298
skydocMain .eval (
297
- StarlarkSemantics .DEFAULT ,
299
+ StarlarkSemantics .builder ()
300
+ .setBool (BuildLanguageOptions .INCOMPATIBLE_REMOVE_RULE_NAME_PARAMETER , false )
301
+ .build (),
298
302
Label .parseAbsoluteUnchecked ("//test:test.bzl" ),
299
303
ruleInfoMap ,
300
304
ImmutableMap .builder (),
You can’t perform that action at this time.
0 commit comments