question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manifold Properties don't compile with JDK 16

See original GitHub issue

Describe the bug I am trying to compile my project on IntelliJ IDEA with maven, I’m using JDK 16 and everything goes fine till I added manifold properties dependency

<dependency>
    <groupId>systems.manifold</groupId>
    <artifactId>manifold-props-rt</artifactId>
    <version>${manifold.version}</version>
</dependency>

and related plugin path.

The error is the following:

java.lang.NoSuchMethodError: 'boolean com.sun.tools.javac.code.Symbol.isLocal()'
        at manifold.ext.props.Util.isPropertyField(Util.java:160)
        at manifold.ext.props.PropertyInference.handleExistingField(PropertyInference.java:419)
        at manifold.ext.props.PropertyInference.makeVal(PropertyInference.java:274)
        at manifold.ext.props.PropertyInference.handleVals(PropertyInference.java:217)
        at manifold.ext.props.PropertyInference.inferProperties(PropertyInference.java:74)
        at manifold.ext.props.PropertyProcessor.inferPropertiesFromClassReader(PropertyProcessor.java:156)
        at manifold.ext.props.ClassReaderCompleter.lambda$complete$1(ClassReaderCompleter.java:132)
        at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:191)
        at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
        at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1750)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1071)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:936)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
        at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
        at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)

To Reproduce Steps to reproduce the behavior:

  1. Create a new maven project
  2. Add manifold properties plugin dependency
  3. Add a class with at least a @var
  4. Compile, you will get a generic error (execute mvn clean install -X to see error details )

Expected behavior Compile of @var fields is performed correctly.

Desktop (please complete the following information):

  • OS Type & Version: macOS Catalina
  • Java/JDK version: JDK 16 (X)
  • IDE version (IntelliJ IDEA or Android Studio): IntelliJ IDEA 2020.3.2, here some informations about it:
IntelliJ IDEA 2020.3.2 (Ultimate Edition)
Build #IU-203.7148.57, built on January 26, 2021
Licensed to Alessandro Muzzi
Subscription is active until December 28, 2021.
For educational use only.
Runtime version: 11.0.9.1+11-b1145.77 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.3
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: actionSystem.force.alt.gr=true
Non-Bundled Plugins: manifold.ij, Dart, org.jetbrains.kotlin
  • Manifold version: 2021.1.9
  • Manifold IntelliJ plugin version: 2020.3.39

Stack trace Already applied in description.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AleMuzzicommented, Mar 27, 2021

Oh, ok, I’ll keep it in mind, thanks.

1reaction
AleMuzzicommented, Mar 27, 2021

I’m really glad to hear that! I’ve just tested the new version with JDK 16 and it works like a charm. The only thing I noticed is that just changing the plugin version in pom.xml led to a build success but the IDE still kept reporting error in files containing @var. After I have performed an uninstall and a reinstall of the plugin everything worked fine. Thanks for the fast fix! I’m glad I have helped you, you’re doing an awesome job, this plugin is a game changing in Java programming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

News - Manifold
Manifold now provides a fully integrated Java Preprocessor. The Java Preprocessor is designed exclusively for conditional compilation of Java ...
Read more >
Manifold is a Java compiler plugin, its features include ...
Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a ...
Read more >
maven - Lombok's access to jdk.compiler's internal packages ...
The exception you are seeing with the latest JDK-16 build is because of JEP 396: Strongly Encapsulate JDK Internals by Default.
Read more >
Manifold - IntelliJ IDEA & Android Studio Plugin | Marketplace
Manifold is a Java compiler plugin. It supplements Java with: Direct, type-safe access to: GraphQL schemas, queries, etc. JSON & JSON Schema, YAML,...
Read more >
systems.manifold : manifold-parent : 2021.1.8 - Maven Central ...
All fully supported in Java 8 - 16 with comprehensive support in IntelliJ IDEA and Android Studio. Simply add Manifold to your existing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found