gnodet commented on code in PR #1165: URL: https://github.com/apache/maven-compiler-plugin/pull/1165#discussion_r4792587402
########## src/main/java/org/apache/maven/plugin/compiler/incremental/ProcessorType.java: ########## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.plugin.compiler.incremental; + +/** + * Classification of annotation processors for incremental compilation. + * + * <p>Follows the same taxonomy as Gradle's incremental annotation processing + * for ecosystem compatibility. + * + * @see ProcessorClassification + */ +public enum ProcessorType { + + /** + * Each annotated input type produces independent generated outputs. + * Safe for incremental compilation — only the changed annotated type + * and its generated outputs need reprocessing. + */ + ISOLATING, + + /** + * Generated outputs may depend on the full set of annotated types + * (e.g., Dagger component graphs, ServiceLoader registrations). + * When any source carrying the processor's trigger annotations changes, + * all sources with those annotations must be included in the compilation. + */ + AGGREGATING, + + /** + * Processor has not declared its incremental behavior. When any annotated + * source changes, all sources are recompiled as a conservative fallback. + */ + UNKNOWN Review Comment: **Documentation clarity**: The javadoc could be more specific about WHEN "all sources are recompiled". Current: "all sources are recompiled as a conservative fallback" This could be misread as "all sources are always recompiled." Consider clarifying: ```java /** * Processor has not declared its incremental behavior. When any annotated * source changes, all sources in the compilation unit are recompiled as a * conservative fallback. */ UNKNOWN ``` This makes it clear that: 1. The trigger is "when any annotated source changes" 2. The scope is "all sources in the compilation unit" 3. It's a fallback strategy, not the only mode _Claude Code on behalf of Guillaume Nodet_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
