Skip to content

Commit

Permalink
Rename disable_annotation_processing to enable_annotation_processing
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 376994859
  • Loading branch information
cushon authored and Copybara-Service committed Jun 2, 2021
1 parent 6b8eabb commit ecf6b18
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Expand Up @@ -591,7 +591,7 @@ public Builder setJavaConstraints(ImmutableList<String> javaConstraints) {
return this;
}

// TODO(b/111090089): delete once java_common.compile(disable_annotation_processing) is
// TODO(b/111090089): delete once java_common.compile(enable_annotation_processing) is
// available
public Builder experimentalDisableAnnotationProcessing() {
JavaPluginInfo provider =
Expand Down
Expand Up @@ -264,7 +264,7 @@ public JavaInfo createJavaCompileAction(
ImmutableList<Artifact> sourcepathEntries,
List<Artifact> resources,
Boolean neverlink,
Boolean disableAnnotationProcessing,
Boolean enableAnnotationProcessing,
JavaSemantics javaSemantics,
StarlarkThread thread)
throws EvalException, InterruptedException {
Expand Down Expand Up @@ -296,7 +296,7 @@ public JavaInfo createJavaCompileAction(
streamProviders(exports, JavaCompilationArgsProvider.class).forEach(helper::addExport);
helper.setCompilationStrictDepsMode(getStrictDepsMode(Ascii.toUpperCase(strictDepsMode)));
JavaPluginInfo pluginInfo = mergeExportedJavaPluginInfo(plugins, deps);
if (disableAnnotationProcessing) {
if (!enableAnnotationProcessing) {
pluginInfo = pluginInfo.disableAnnotationProcessing();
}
helper.setPlugins(pluginInfo);
Expand Down
Expand Up @@ -78,7 +78,7 @@ public JavaInfo createJavaCompileAction(
Sequence<?> sourcepathEntries, // <Artifact> expected
Sequence<?> resources, // <Artifact> expected
Boolean neverlink,
Boolean disableAnnotationProcessing,
Boolean enableAnnotationProcessing,
StarlarkThread thread)
throws EvalException, InterruptedException {

Expand Down Expand Up @@ -147,7 +147,7 @@ public JavaInfo createJavaCompileAction(
ImmutableList.copyOf(Sequence.cast(sourcepathEntries, Artifact.class, "sourcepath")),
Sequence.cast(resources, Artifact.class, "resources"),
neverlink,
disableAnnotationProcessing,
enableAnnotationProcessing,
javaSemantics,
thread);
}
Expand Down
Expand Up @@ -217,10 +217,10 @@ public interface JavaCommonApi<
defaultValue = "[]"),
@Param(name = "neverlink", positional = false, named = true, defaultValue = "False"),
@Param(
name = "disable_annotation_processing",
name = "enable_annotation_processing",
positional = false,
named = true,
defaultValue = "False",
defaultValue = "True",
doc =
"Disables annotation processing in this compilation, causing any annotation"
+ " processors provided in plugins or in exported_plugins of deps to be"
Expand Down Expand Up @@ -249,7 +249,7 @@ JavaInfoT createJavaCompileAction(
Sequence<?> sourcepathEntries, // <FileT> expected.
Sequence<?> resources, // <FileT> expected.
Boolean neverlink,
Boolean disableAnnotationProcessing,
Boolean enableAnnotationProcessing,
StarlarkThread thread)
throws EvalException, InterruptedException;

Expand Down Expand Up @@ -512,7 +512,7 @@ JavaInfoT addConstraints(JavaInfoT javaInfo, Sequence<?> constraints /* <String>
enableOnlyWithFlag = BuildLanguageOptions.EXPERIMENTAL_GOOGLE_LEGACY_API)
Sequence<String> getConstraints(JavaInfoT javaInfo);

// TODO(b/111090089): delete once java_common.compile(disable_annotation_processing) is available
// TODO(b/111090089): delete once java_common.compile(enable_annotation_processing) is available
@StarlarkMethod(
name = "experimental_disable_annotation_processing",
doc =
Expand Down
Expand Up @@ -3076,7 +3076,7 @@ public void testSkipAnnotationProcessing() throws Exception {
" java_toolchain = ctx.attr._java_toolchain[java_common.JavaToolchainInfo],",
" deps = [p[JavaInfo] for p in ctx.attr.deps],",
" plugins = [p[JavaPluginInfo] for p in ctx.attr.plugins],",
" disable_annotation_processing = True,",
" enable_annotation_processing = False,",
" )",
" return struct(",
" files = depset([output_jar]),",
Expand Down

0 comments on commit ecf6b18

Please sign in to comment.