salesforce / bazel-jdt-java-toolchain

Eclipse Java Compiler (ECJ) for Bazel
Apache License 2.0
9 stars 6 forks source link

JSR308 style annotations require explicit @Target annotation #13

Closed Assk closed 1 year ago

Assk commented 1 year ago

Reverting JDT Bug 552082-Fix the applicability of a no-@target annotation type updates, as the behavior is not compatible with JDK 11 and also with latest javac.

For jdt.core, refer to https://bugs.eclipse.org/bugs/show_bug.cgi?id=552082 for more details.

For javac, refer to https://bugs.openjdk.org/browse/JDK-8231435 and https://bugs.openjdk.org/browse/JDK-8231436 for more details.

Assk commented 1 year ago

@guw - I am still testing the change, will remove the draft state after completing the test.

guw commented 1 year ago

@Assk Can you also open a bug at https://github.com/eclipse-jdt/eclipse.jdt.core? I'd like to better understand why this needs to be reverted. From reading through bug 552082 it looks like Stephan implemented to support Java 11. Also according to https://bugs.openjdk.org/browse/JDK-8231436 it seems javac is broken but ecj is ok?

Assk commented 1 year ago

Looks like they may already have a bug 533199 open for something similar. The part I am having trouble is https://bugs.openjdk.org/browse/JDK-8231435 says spec affected version is from JDK 13 and is resolved only in JDK 14. Here is the discussion they had for older releases: https://mail.openjdk.org/pipermail/compiler-dev/2019-September/013705.html

guw commented 1 year ago

@Assk Can you add all this to the README as part of the PR? This keeps track of the modifications. https://github.com/salesforce/bazel-jdt-java-toolchain/blob/main/compiler/src/main/ecj/README.md