Skip to content

Update CI to Java 16 #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mp911de opened this issue Mar 19, 2021 · 4 comments
Closed

Update CI to Java 16 #1104

mp911de opened this issue Mar 19, 2021 · 4 comments
Labels
type: task A general task

Comments

@mp911de
Copy link
Member

mp911de commented Mar 19, 2021

No description provided.

@mp911de mp911de added the type: task A general task label Mar 19, 2021
@mp911de mp911de added this to the 4.2 RC1 (2021.0.0) milestone Mar 19, 2021
@mikereiche
Copy link
Collaborator

see https://youtrack.jetbrains.com/issue/IDEA-263241 and projectlombok/lombok#2681
(even if not using lombok and disabling the lombok plugin, the problem with lombok exists)

To compile in maven, this needs a number of --add-opens :

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>16</source>
                <target>16</target>
                <fork>true</fork>
                <compilerArgs>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
                    <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED</arg>
                </compilerArgs>
                <annotationProcessorPaths>
                    <path>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>1.18.16</version>
                    </path>
                </annotationProcessorPaths>
            </configuration>
        </plugin>

Intellij needs those as well as java.util :

--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED

Runtime -

for java.util.UUID and java.util.Optional
   --add-opens=java.base/java.util=ALL-UNNAMED
 for java.math.BigDecimal and BigInteger
  --add-opens=java.base/java.math=ALL-UNNAMED
 for java.lang.boolean, byte[], Integer
  --add-opens=java.base/java.lang=ALL-UNNAMED  

@mikereiche
Copy link
Collaborator

Previously had information from Mark in #1057. Should do that instead of using jvm flags.
#1057

@mp911de
Copy link
Member Author

mp911de commented Mar 26, 2021

Let's put this ticket on hold for now. Kotlin and Lombok still have compatibility issues and we can only continue here once both issues are resolved.

@mikereiche
Copy link
Collaborator

mikereiche commented Mar 26, 2021

The issue with UUID still exists apart from Lombok/Intellij issues. The Couchbase CustomConversions does not map very well to Mongo CustomConversions. I'm working on sorting that out.

gregturn added a commit that referenced this issue May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

3 participants