You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "hgschmie (via GitHub)" <gi...@apache.org> on 2023/10/04 05:15:10 UTC

[PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

hgschmie opened a new pull request, #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200

   Turns out this is just a documentation issue. `full` works fine but is
   not documented.
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MCOMPILER) filed
          for the change (usually before you start working on it).  Trivial changes like typos do not
          require a JIRA issue.  Your pull request should address just this issue, without
          pulling in other changes.
    - [X] Each commit in the pull request should have a meaningful subject line and body.
    - [X] Format the pull request title like `[MCOMPILER-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MCOMPILER-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the
          commit message.
    - [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
          be performed on your pull request automatically.
    - [X] You have run the integration tests successfully (`mvn -Prun-its clean verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie merged PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1512176374


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   While it is great that this is forward ported to the latest versions of 8,11 and 17, there is still the issue of people running with older versions of the JDK and can not change. So it would be nice to have a bit more logic in there. 
   
   @EwoutH I saw your comment; sorry I am pretty swamped right now to work on this change beyond this initial PR. 



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1513223723


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   Hmm, shouldnt we revert the parent change? except it is a breaking change it is also unexpected IMHO.
   
   side note: this does not allow more than compilerArgs but enables to get conflicting args now ;).
   
   Agree with you @bmarwell if v4 arrives at ~the same time than v3.x+1 since 21 starts to be used and everybody creates the verbose way in the pom which is very unlikely IMHO



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1431020333


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   we should add notice that `full` available for JDK 21+



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1513101249


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   we can add a property for `proc` parameter and property can be overridden in child modules with empty value.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1370248141


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   ... and I keep forgetting about this, and for me this sounds like "most correct" solution as well: split steps and use existing phases even we provide.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "jddarcy (via GitHub)" <gi...@apache.org>.
jddarcy commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1512085550


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   > Another solution (which is probably intended by the JDK folks): I used to do two executions in my projects:
   > 
   >     * generate-sources: execute with `proc:only`
   > 
   >     * default-compile: execute with `proc:none`
   > 
   > 
   > Worked like a charm and only changed it because Tamas hinted me to do so (because with this setup, some things like caching, incremental compilation etc. won't work that well or not at all). However, this solution would not run into those problems at all.
   
   Just running annotation processing when there is explicit need and intention to do so would be fine too.
   
   The warning note is only printed when annotation processing by default is being used. If there is explicit configuration annotation processing related options, like `-processorpath` the note is not printed.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#issuecomment-1748004949

   Turns out that this might not be sufficient. JDK < 21 does *not* support "full" as a value, so we may want to check whether the value is "full" and omit it when the JDK is < 21. 
   
   Requires more thought.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1512962253


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   We can use conditions depending on the javac version (as we currently do in https://github.com/codehaus-plexus/plexus-compiler/blob/d8e98dda661b2e976f5382d43bb87dea1434381f/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java#L348). But IMHO m-compiler-p should add a more high level abstraction, as other compilers might handle that differently...



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1513457686


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   I feel that we talk about one line in documentation too much 😄 



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1402749922


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   +1 to keep backward compat and annot proc working by default.
   Guess fastest is once the loader (urls) are know to cbexk if there is either the meta-inf SPI file or a module-info registering an annot proc and if so run peoc only before the compilation. Can be done on all versions probably.
   Indeed, if explicitly disabled it is ignored.
   So overall overhead is negligible and it will work for everyone and keep annlt proc goodness.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1513106708


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   > We can use conditions depending on the javac version
   
   fact is we don't know with javac version what is supported since several vendors did backport full support.
   
   > we can add a property for proc parameter and property can be overridden in child modules with empty value.
   
   It is already the case AFAIK (side note being adding properties for compiler args is quite misleading and lead to broken configuration more than it helps IMHO).
   
   -> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#proc
   
   Think we don't have much choice to split the default compilation in 2 runs if there is at least one processor available (path or serviceloader discovery) and proc is not configured in compiler properties or args.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1497418122


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   well issue is that `full` got backported to several lower versions too so I don't think we can write something relevant so ensuring we do the two passes when there is at least one SPI file sounds more robust until proc:none is set in the configuration (either `proc` or `compilerArgs`).



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "EwoutH (via GitHub)" <gi...@apache.org>.
EwoutH commented on PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#issuecomment-1956457903

   Any update on this effort? What's needed to move it forward?


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1513118861


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   this allow to override https://github.com/apache/maven-parent/pull/157



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "bmarwell (via GitHub)" <gi...@apache.org>.
bmarwell commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1513179298


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   Then we can use a property for that.
   
   My suggestion:
   Leave it like in this PR for m-c-p 3. Detection is "smart" and will many builds, because they of course will have something like this already configured.
   
   For m-c-p 4.x use two phases all the time, even if there's no APT. An empty run (no sources) doesn't hurt.
   
   We can define properties for those as well, of course.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1370409335


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   Interesting. Thank you for suggesting this. I can see the problems with incremental compilation but it still might be an acceptable workaround. Does that increase build times? Without static code analysis and tests, running the compiler is dominating build times and this seems to double those.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "bmarwell (via GitHub)" <gi...@apache.org>.
bmarwell commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1370169302


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   Another solution (which is probably intended by the JDK folks):
   I used to do two executions in my projects:
   
   * generate-sources: execute with `proc:only`
   * default-compile: execute with `proc:none`
   
   Worked like a charm and only changed it because Tamas hinted me to do so (because with this setup, some things like caching, incremental compilation etc. won't work that well or not at all).
   However, this solution would not run into those problems at all.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "bmarwell (via GitHub)" <gi...@apache.org>.
bmarwell commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1368373845


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   What happens if I do not set it?  This seems to contradict the wording from line 276:
   
   > If not set, both compilation and annotation processing are performed at the same time.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1369182520


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   if you don't set it on JDK 21, you will be greeted with a warning that "soon, not setting proc:full will result in no longer doing annotation processing".
   
   It is a very unsatisfying situation: 
   
   JDK < 21: proc:full is not allowed, results in `error: invalid flag: -proc:full`
   JDK == 21:  proc:full works, a warning is reported without it
   JDK > 21: proc:full is *required* at some point, no more annotation processing without it
   
   which puts the compiler plugin in the unfortunate situation of having to check the version of javac first before either not passing in `-proc:full` (because it is JDK < 21 and it is set by default) or passing it in for JDK >= 21.
   
   That's why the comment reads "requires more thought". I have not found time to deal with it. Right now, I have a conditional profile in my poms... 😵‍💫 
   
   



##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   if you don't set it on JDK 21, you will be greeted with a warning that "soon, not setting proc:full will result in no longer doing annotation processing".
   
   It is a very unsatisfying situation: 
   
   JDK < 21: proc:full is not allowed, results in `error: invalid flag: -proc:full`
   JDK == 21:  proc:full works, a warning is reported without it
   JDK > 21: proc:full is *required* at some point, no more annotation processing without it
   
   which puts the compiler plugin in the unfortunate situation of having to check the version of javac first before either not passing in `-proc:full` (because it is JDK < 21 and it is set by default) or passing it in for JDK >= 21.
   
   That's why the comment reads "requires more thought". I have not found time to deal with it. Right now, I have a conditional profile in my poms... 😵‍💫 
   
   



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1369289506


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   Hah, just hit the same: I explicitly wanted to disable proc (as am not using it, but unintentionally there ARE APs present on classpath, like Sisu AP is), so I set in TLP proc=none. Cool so far. Then in one module I needed AP, but as parent had proc=none, I had to enable, so I did proc=full, just to figure, that it breaks everything below Java 21...



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MCOMPILER-548] JDK 21 throws annotations processing warning that can not be turned off [maven-compiler-plugin]

Posted by "jddarcy (via GitHub)" <gi...@apache.org>.
jddarcy commented on code in PR #200:
URL: https://github.com/apache/maven-compiler-plugin/pull/200#discussion_r1512075244


##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -279,8 +279,11 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
      * <ul>
      * <li><code>none</code> - no annotation processing is performed.</li>
      * <li><code>only</code> - only annotation processing is done, no compilation.</li>
+     * <li><code>full</code> - annotation processing and compilation.</li>
      * </ul>
      *
+     * <code>full</code> is the default. Starting with JDK 21, this option must be set explicitly.

Review Comment:
   > well issue is that `full` got backported to several lower versions too so I don't think we can write something relevant so ensuring we do the two passes when there is at least one SPI file sounds more robust until proc:none is set in the configuration (either `proc` or `compilerArgs`).
   
   In more detail, `-proc:full` will be supported in 11u and 17u (and Oracle 8u) as of the April 2024 releases: https://bugs.openjdk.org/browse/JDK-8308245 HTH



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org