Bug 559138 - Update ajc command line help to reflect support of Java 10-13
Summary: Update ajc command line help to reflect support of Java 10-13
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.9.5   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: 1.9.7   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-13 23:23 EST by Alexander Kriegisch CLA
Modified: 2021-06-08 12:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kriegisch CLA 2020-01-13 23:23:09 EST
Currently ajc says:

 Compliance options:
    -1.3               use 1.3 compliance (-source 1.3 -target 1.1)
    -1.4             + use 1.4 compliance (-source 1.3 -target 1.2)
    -1.5 -5 -5.0       use 1.5 compliance (-source 1.5 -target 1.5)
    -1.6 -6 -6.0       use 1.6 compliance (-source 1.6 -target 1.6)
    -1.7 -7 -7.0       use 1.7 compliance (-source 1.7 -target 1.7)
    -1.8 -8 -8.0       use 1.8 compliance (-source 1.8 -target 1.8)
    -1.9 -9 -9.0       use 1.9 compliance (-source 1.9 -target 1.9)
    -source <version>  set source level: 1.3 to 1.9 (or 6, 6.0, etc)
    -target <version>  set classfile target: 1.1 to 1.9 (or 6, 6.0, etc)
                       cldc1.1 can also be used to generate the StackMap
                       attribute

But actually I can do something like:

ajc -cp "c:\Program Files\Java\AspectJ\lib\aspectjrt.jar" --enable-preview -13 Code.java

Which means that neither CLI help nor ajc documentation in the AspectJ manual on the website are up to date. Please fix that.
Comment 1 Andrew Clement CLA 2020-04-21 01:06:36 EDT
The file for AspectJ here:
https://github.com/eclipse/org.aspectj/blob/master/org.aspectj.ajdt.core/src/main/resources/org/aspectj/ajdt/ajc/messages.properties

needs a full compare with the one in JDT:

https://github.com/eclipse/eclipse.jdt.core/blob/master/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties

Although I do see even the JDT ones hasn't got 10+ in it. However, I'm more concerned we are probably missing a bunch of the other flags that have changed in JDT. Should address all this together.
Comment 2 Alexander Kriegisch CLA 2020-04-21 01:40:00 EDT
Sounds like a reasonable plan. I had no idea that up-stream in ECJ the online help is also not up to date. Even so, using those undocumented flags works, the help text just does not list them AFAIK.
Comment 3 Alexander Kriegisch CLA 2021-06-08 01:06:55 EDT
I lately fixed that myself, it is now up to date until Java 16. I changed the whole process of creating usage texts by always using the original upstream texts from Eclipse JDT Core (ECJ batch compiler) and add the AspectJ-specific diff during runtime. I.e., we no longer need to manually update the upstream texts, merely check if our insertion still works as expected.

References:
https://github.com/eclipse/aspectj.eclipse.jdt.core/commit/b631a62d6a95d2a634bf8931b0b313135b285705
https://github.com/eclipse/org.aspectj/commit/7ee0f70ce7e50e61daa41b124c7837d45bfd386f
Comment 4 Alexander Kriegisch CLA 2021-06-08 01:09:08 EDT
Andy, please set target 1.9.7. Thank you.
Comment 5 Andrew Clement CLA 2021-06-08 12:54:24 EDT
target set