Skip to content

Commit da7b49b

Browse files
hvadehracopybara-github
authored andcommitted
Delete --incompatible_java_common_parameters
The flag has been a no-op for a long while. Fixes #12373 PiperOrigin-RevId: 702226306 Change-Id: Ie79abdd7a90d404c55d191ba66cfac965ed7a7f5
1 parent 3831e85 commit da7b49b

3 files changed

Lines changed: 1 addition & 56 deletions

File tree

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -642,17 +642,6 @@ public final class BuildLanguageOptions extends OptionsBase {
642642
+ "returns a depset instead.")
643643
public boolean incompatibleDepsetForLibrariesToLinkGetter;
644644

645-
@Option(
646-
name = "incompatible_java_common_parameters",
647-
defaultValue = "true",
648-
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
649-
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
650-
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
651-
help =
652-
"If set to true, the output_jar, and host_javabase parameters in pack_sources and "
653-
+ "host_javabase in compile will all be removed.")
654-
public boolean incompatibleJavaCommonParameters;
655-
656645
@Option(
657646
name = "incompatible_java_info_merge_runtime_module_flags",
658647
defaultValue = "false",
@@ -885,7 +874,6 @@ public StarlarkSemantics toStarlarkSemantics() {
885874
.setBool(
886875
INCOMPATIBLE_FIX_PACKAGE_GROUP_REPOROOT_SYNTAX,
887876
incompatibleFixPackageGroupReporootSyntax)
888-
.setBool(INCOMPATIBLE_JAVA_COMMON_PARAMETERS, incompatibleJavaCommonParameters)
889877
.setBool(
890878
INCOMPATIBLE_JAVA_INFO_MERGE_RUNTIME_MODULE_FLAGS,
891879
incompatibleJavaInfoMergeRuntimeModuleFlags)
@@ -1001,8 +989,6 @@ public StarlarkSemantics toStarlarkSemantics() {
1001989
FlagConstants.INCOMPATIBLE_FIX_PACKAGE_GROUP_REPOROOT_SYNTAX;
1002990
public static final String INCOMPATIBLE_DO_NOT_SPLIT_LINKING_CMDLINE =
1003991
"+incompatible_do_not_split_linking_cmdline";
1004-
public static final String INCOMPATIBLE_JAVA_COMMON_PARAMETERS =
1005-
"+incompatible_java_common_parameters";
1006992
public static final String INCOMPATIBLE_JAVA_INFO_MERGE_RUNTIME_MODULE_FLAGS =
1007993
"-incompatible_java_info_merge_runtime_module_flags";
1008994
public static final String INCOMPATIBLE_NO_ATTR_LICENSE = "+incompatible_no_attr_license";

src/main/java/com/google/devtools/build/lib/starlarkbuildapi/java/JavaCommonApi.java

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.google.devtools.build.lib.collect.nestedset.Depset.TypeException;
2222
import com.google.devtools.build.lib.packages.Info;
2323
import com.google.devtools.build.lib.packages.RuleClass.ConfiguredTargetFactory.RuleErrorException;
24-
import com.google.devtools.build.lib.packages.semantics.BuildLanguageOptions;
2524
import com.google.devtools.build.lib.starlarkbuildapi.FileApi;
2625
import com.google.devtools.build.lib.starlarkbuildapi.StarlarkActionFactoryApi;
2726
import com.google.devtools.build.lib.starlarkbuildapi.StarlarkRuleContextApi;
@@ -77,21 +76,6 @@ default JavaInfoT mergeJavaProviders(Sequence<?> providers /* <JavaInfoT> expect
7776
+ "At least one of parameters output_jar or output_source_jar is required.",
7877
parameters = {
7978
@Param(name = "actions", named = true, doc = "ctx.actions"),
80-
@Param(
81-
name = "output_jar",
82-
positional = false,
83-
named = true,
84-
allowedTypes = {
85-
@ParamType(type = FileApi.class),
86-
@ParamType(type = NoneType.class),
87-
},
88-
defaultValue = "None",
89-
doc =
90-
"Deprecated: The output jar of the rule. Used to name the resulting source jar. "
91-
+ "The parameter sets output_source_jar parameter to `{output_jar}-src.jar`."
92-
+ "Use output_source_jar parameter directly instead.",
93-
disableWithFlag = BuildLanguageOptions.INCOMPATIBLE_JAVA_COMMON_PARAMETERS,
94-
valueWhenDisabled = "None"),
9579
@Param(
9680
name = "output_source_jar",
9781
positional = false,
@@ -121,25 +105,13 @@ default JavaInfoT mergeJavaProviders(Sequence<?> providers /* <JavaInfoT> expect
121105
positional = false,
122106
named = true,
123107
doc = "A JavaToolchainInfo to used to find the ijar tool."),
124-
@Param(
125-
name = "host_javabase",
126-
positional = false,
127-
named = true,
128-
doc =
129-
"Deprecated: You can drop this parameter (host_javabase is provided with "
130-
+ "java_toolchain)",
131-
defaultValue = "None",
132-
disableWithFlag = BuildLanguageOptions.INCOMPATIBLE_JAVA_COMMON_PARAMETERS,
133-
valueWhenDisabled = "None"),
134108
})
135109
default FileApi packSources(
136110
StarlarkActionFactoryT actions,
137-
Object outputJar,
138111
Object outputSourceJar,
139112
Sequence<?> sourceFiles, // <FileT> expected.
140113
Sequence<?> sourceJars, // <FileT> expected.
141-
Info javaToolchain,
142-
Object hostJavabase)
114+
Info javaToolchain)
143115
throws EvalException {
144116
throw new UnsupportedOperationException();
145117
}
@@ -352,16 +324,6 @@ default FileApi runIjar(
352324
doc =
353325
"A BootClassPathInfo to be used for this compilation. If present, overrides the"
354326
+ " bootclasspath associated with the provided java_toolchain."),
355-
@Param(
356-
name = "host_javabase",
357-
positional = false,
358-
named = true,
359-
doc =
360-
"Deprecated: You can drop this parameter (host_javabase is provided with "
361-
+ "java_toolchain)",
362-
defaultValue = "None",
363-
disableWithFlag = BuildLanguageOptions.INCOMPATIBLE_JAVA_COMMON_PARAMETERS,
364-
valueWhenDisabled = "None"),
365327
@Param(
366328
name = "sourcepath",
367329
positional = false,
@@ -462,7 +424,6 @@ default JavaInfoT createJavaCompileAction(
462424
String strictDepsMode,
463425
Info javaToolchain,
464426
Object bootClassPath,
465-
Object hostJavabase,
466427
Sequence<?> sourcepathEntries, // <FileT> expected.
467428
Sequence<?> resources, // <FileT> expected.
468429
Sequence<?> resourceJars, // <FileT> expected.

src/test/java/com/google/devtools/build/lib/packages/semantics/ConsistencyTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ private static BuildLanguageOptions buildRandomOptions(Random rand) throws Excep
142142
"--incompatible_disallow_struct_provider_syntax=" + rand.nextBoolean(),
143143
"--incompatible_do_not_split_linking_cmdline=" + rand.nextBoolean(),
144144
"--incompatible_enable_deprecated_label_apis=" + rand.nextBoolean(),
145-
"--incompatible_java_common_parameters=" + rand.nextBoolean(),
146145
"--incompatible_merge_fixed_and_default_shell_env=" + rand.nextBoolean(),
147146
"--incompatible_no_attr_license=" + rand.nextBoolean(),
148147
"--incompatible_no_implicit_file_export=" + rand.nextBoolean(),
@@ -194,7 +193,6 @@ private static StarlarkSemantics buildRandomSemantics(Random rand) {
194193
BuildLanguageOptions.INCOMPATIBLE_DISALLOW_STRUCT_PROVIDER_SYNTAX, rand.nextBoolean())
195194
.setBool(BuildLanguageOptions.INCOMPATIBLE_DO_NOT_SPLIT_LINKING_CMDLINE, rand.nextBoolean())
196195
.setBool(BuildLanguageOptions.INCOMPATIBLE_ENABLE_DEPRECATED_LABEL_APIS, rand.nextBoolean())
197-
.setBool(BuildLanguageOptions.INCOMPATIBLE_JAVA_COMMON_PARAMETERS, rand.nextBoolean())
198196
.setBool(
199197
BuildLanguageOptions.INCOMPATIBLE_MERGE_FIXED_AND_DEFAULT_SHELL_ENV, rand.nextBoolean())
200198
.setBool(BuildLanguageOptions.INCOMPATIBLE_NO_ATTR_LICENSE, rand.nextBoolean())

0 commit comments

Comments
 (0)