Skip to content
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

Error running japicmp-maven-plugin:0.14.4:cmp on Java 16-EA #1

Closed
jhy opened this issue Dec 15, 2020 · 1 comment
Closed

Error running japicmp-maven-plugin:0.14.4:cmp on Java 16-EA #1

jhy opened this issue Dec 15, 2020 · 1 comment

Comments

@jhy
Copy link

jhy commented Dec 15, 2020

Hi, thanks for the great japicmp plugin, I have started using it in my jsoup library to validate compatibility and have found it very useful.

I have GitHub Actions running CI builds across multiple Java versions including the Java 16 Early Access build.

Here's a passing round (from 16-ea ubuntu):

https://github.com/jhy/jsoup/runs/1556442000?check_suite_focus=true

[DEBUG] Configuring mojo 'com.github.siom79.japicmp:japicmp-maven-plugin:0.14.4:cmp' with basic configurator -->
[DEBUG]   (f) artifactRepositories = [      id: central
      url: https://repo.maven.apache.org/maven2
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily]
]
[DEBUG]   (f) localRepository =       id: local
      url: file:///home/runner/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]

[DEBUG]   (f) mavenProject = MavenProject: org.jsoup:jsoup:1.14.1-SNAPSHOT @ /home/runner/work/jsoup/jsoup/pom.xml
[DEBUG]   (f) mojoExecution = com.github.siom79.japicmp:japicmp-maven-plugin:0.14.4:cmp {execution: default}
[DEBUG]   (s) groupId = org.jsoup
[DEBUG]   (s) artifactId = jsoup
[DEBUG]   (s) version = 1.13.1
[DEBUG]   (s) type = jar
[DEBUG]   (s) dependency = Dependency{groupId='org.jsoup', artifactId='jsoup', version='1.13.1', scope='null', systemPath='null', classifier='null', type='jar'}
[DEBUG]   (f) oldVersion = japicmp.maven.Version@66f2f19e
[DEBUG]   (s) onlyModified = true
[DEBUG]   (s) breakBuildOnBinaryIncompatibleModifications = true
[DEBUG]   (s) breakBuildOnSourceIncompatibleModifications = true
[DEBUG]   (f) parameter = japicmp.maven.Parameter@7f182c24
[DEBUG]   (f) projectBuildDir = /home/runner/work/jsoup/jsoup/target
[DEBUG]   (f) versionRangeWithProjectVersion = (,1.14.1-SNAPSHOT)
[DEBUG] -- end configuration --
[DEBUG] No packaging support defined, no filtering
[DEBUG] Trying to resolve dependency 'Dependency{groupId='org.jsoup', artifactId='jsoup', version='1.13.1', scope='null', systemPath='null', classifier='null', type='jar'}' to file.
[DEBUG] oldVersion: org.jsoup:jsoup:1.13.1
[DEBUG] Could open file '/home/runner/work/jsoup/jsoup/target/jsoup-1.14.1-SNAPSHOT.jar' of artifact as jar archive: /home/runner/work/jsoup/jsoup/target/jsoup-1.14.1-SNAPSHOT.jar
[DEBUG] None of the elements <oldClassPathDependencies/>, <newClassPathDependencies/> or <dependencies/> found. Using ONE_COMMON_CLASSPATH
[DEBUG] No post-analysis script provided.
[INFO] Written file '/home/runner/work/jsoup/jsoup/target/japicmp/japicmp.diff'.
[INFO] Written file '/home/runner/work/jsoup/jsoup/target/japicmp/japicmp.xml'.
[INFO] Written file '/home/runner/work/jsoup/jsoup/target/japicmp/japicmp.html'.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  52.994 s
[INFO] Finished at: 2020-12-15T10:40:34Z
[INFO] ------------------------------------------------------------------------

And now on a subsequent run, this error is created:
(Please see the report url - https://github.com/jhy/jsoup/runs/1556669892?check_suite_focus=true - for the full trace)

[DEBUG]   (f) artifactRepositories = [      id: central
      url: https://repo.maven.apache.org/maven2
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily]
]
[DEBUG]   (f) localRepository =       id: local
      url: file:///home/runner/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]

[DEBUG]   (f) mavenProject = MavenProject: org.jsoup:jsoup:1.14.1-SNAPSHOT @ /home/runner/work/jsoup/jsoup/pom.xml
[DEBUG]   (f) mojoExecution = com.github.siom79.japicmp:japicmp-maven-plugin:0.14.4:cmp {execution: default}
[DEBUG]   (s) groupId = org.jsoup
[DEBUG]   (s) artifactId = jsoup
[DEBUG]   (s) version = 1.13.1
[DEBUG]   (s) type = jar
[DEBUG]   (s) dependency = Dependency{groupId='org.jsoup', artifactId='jsoup', version='1.13.1', scope='null', systemPath='null', classifier='null', type='jar'}
[DEBUG]   (f) oldVersion = japicmp.maven.Version@25a636f6
[DEBUG]   (s) onlyModified = true
[DEBUG]   (s) breakBuildOnBinaryIncompatibleModifications = true
[DEBUG]   (s) breakBuildOnSourceIncompatibleModifications = true
[DEBUG]   (f) parameter = japicmp.maven.Parameter@64faf504
[DEBUG]   (f) projectBuildDir = /home/runner/work/jsoup/jsoup/target
[DEBUG]   (f) versionRangeWithProjectVersion = (,1.14.1-SNAPSHOT)
[DEBUG] -- end configuration --
[DEBUG] No packaging support defined, no filtering
[DEBUG] Trying to resolve dependency 'Dependency{groupId='org.jsoup', artifactId='jsoup', version='1.13.1', scope='null', systemPath='null', classifier='null', type='jar'}' to file.
[DEBUG] oldVersion: org.jsoup:jsoup:1.13.1
[DEBUG] Could open file '/home/runner/work/jsoup/jsoup/target/jsoup-1.14.1-SNAPSHOT.jar' of artifact as jar archive: /home/runner/work/jsoup/jsoup/target/jsoup-1.14.1-SNAPSHOT.jar
[DEBUG] None of the elements <oldClassPathDependencies/>, <newClassPathDependencies/> or <dependencies/> found. Using ONE_COMMON_CLASSPATH
[DEBUG] No post-analysis script provided.
[INFO] Written file '/home/runner/work/jsoup/jsoup/target/japicmp/japicmp.diff'.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  56.073 s
[INFO] Finished at: 2020-12-15T11:24:50Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.14.4:cmp (default) on project jsoup: Execution default of goal com.github.siom79.japicmp:japicmp-maven-plugin:0.14.4:cmp failed: An API incompatibility was encountered while executing com.github.siom79.japicmp:japicmp-maven-plugin:0.14.4:cmp: java.lang.ExceptionInInitializerError: null

...

Error:  -----------------------------------------------------: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @516edacb

All the other Java versions (8, 9, 11, 15, on Ubuntu, Windows, Mac) are passing. All the 16-ea (Ubuntu, Windows, Mac) failed with the same error.

The Java version on both executions (full pass, and the fail on 16-ea) is listed as
Java version: 16-ea, vendor: Azul Systems, Inc., runtime: /opt/hostedtoolcache/jdk/16.0.0-ea/x64

I suspect that the specific build of 16.0.0 may have changed between runs.

I understand that this is an EA version and there will be churn and it may not be necessarry to make changes to your code -- perhaps the Java build reverts the change. I wanted to flag it for you earlier for your consideration. Pardon me if I've missed some details or have misconfigured my project. For now, as the builds continue to fail due to this issue, I am disabling testing on 16-ea.

jhy added a commit to jhy/jsoup that referenced this issue Dec 15, 2020
@jhy
Copy link
Author

jhy commented Dec 15, 2020

Sorry, filed this in the wrong repo! Have moved it to siom79/japicmp#275

@jhy jhy closed this as completed Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant