ppkarwasz commented on PR #3852:
URL: https://github.com/apache/logging-log4j2/pull/3852#issuecomment-3133391879

   Hi @rschmitt,
   
   Sorry to hear you've run into so many issues with the upgrade. Fortunately, 
we encountered all of these problems before and we’re happy to help.
    
   > I already have a variety of issues associated with 2.25 that I am working 
on fixing. For example, the JSpecify annotations added in commits like 
[a1dfa85](https://github.com/apache/logging-log4j2/commit/a1dfa853c96604ded1f253da2ec25f8f2f95ef25)
 are breaking JDK8 builds that are using Mockito to mock APIs with those 
annotations, because they don't have those annotations on their test classpath. 
(This appears to be a bug in core reflection. It works fine on JDK17.)
   
   This is a known issue caused by 
[JDK-8152174](https://bugs.openjdk.org/browse/JDK-8152174). We also test on JDK 
8 in our CI pipeline, and have documented the workaround here:
   
   
https://github.com/apache/logging-log4j2/blob/286191e5253da635c271053e8d3b6f433b00c054/log4j-parent/pom.xml#L1160-L1171
   
   > Other builds are failing due to the combination of `-Werror` and 
`-Xlint:classfile`, due to those same annotations: if they're not on the 
compilation classpath, a linter warning gets emitted due to `-Xlint:classfile`, 
which gets upgraded to a compilation error by `-Werror`.
   
   Yes, we’ve run into this too. There’s a detailed discussion on the 
dev@logging mailing list here:
   https://lists.apache.org/thread/7tkztw94v1rfn1l2k7f42nzx3jqpsrff
   
   A few key takeaways:
   
   - Oracle does not consider `-Xlint:classfile` warnings problematic, even 
when emitted for runtime-invisible annotations.
   - For Gradle users, we publish metadata that includes `spotbugs-annotations` 
and similar only as compile-time dependencies, which suppresses the warning.
   - Our initial attempt to address this in Gradle metadata unfortunately broke 
compatibility for users compiling with `--release 8`, so version `2.25.0` is 
incompatible with that setup.
   
   > One library was using `ThrowableProxy`, and its tests started failing 
because `setThrownProxy` was changed to a no-op; I had to patch it to use 
`Throwable`/`setThrown`.
   
   Yes, that should be documented in the release notes. Did we do it properly?
   
   > I haven't submitted issues or bug reports for any of these things, because 
they're not obviously regressions in Log4j itself, and I have to either fix the 
packages that can't upgrade or patch Log4j itself to work around the issue.
   
   Thank you for not opening new issues. We had similar issue reports before, 
but we currently don’t have a clean long-term solution (short of bytecode 
manipulation to strip annotations). Suggestions are always welcome.


-- 
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]

Reply via email to