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

Compilation error: JSON Schema #60

Closed
marksto opened this issue Apr 7, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@marksto
Copy link

commented Apr 7, 2019

Describe the bug
Manifold doesn't seem to compile the provided JSON Schema properly with Java 8.
Test project: https://github.com/marksto/manifold-json-schema-test

To Reproduce
mvn clean install

Expected behavior
Project compiles without errors.

Desktop (please complete the following information):

  • OS Type & Version: "mac os x", version: "10.14.3", arch: "x86_64", family: "mac"
  • Java/JDK version: Java version: 1.8.0_172, vendor: Oracle Corporation
  • IntelliJ IDEA version: 2018.1.2
  • Manifold version: 0.56-alpha
  • Manifold IntelliJ plugin version: 0.56-alpha

Stack trace

/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=XXX/manifold-json-schema-test "-Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=60100:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.1.2 clean install -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building manifold-json-schema-test 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ manifold-json-schema-test ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ manifold-json-schema-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ manifold-json-schema-test ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to XXX/manifold-json-schema-test/target/classes
[INFO] /abc/res/Test.java: abc/res/Test.java uses unchecked or unsafe operations.
[INFO] /abc/res/Test.java: Recompile with -Xlint:unchecked for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /abc/res/Test.java:[210,52] unexpected type
  required: reference
  found:    double
[ERROR] /abc/res/Test.java:[102,48] unexpected type
  required: reference
  found:    double
[ERROR] /abc/res/Test.java:[231,53] unexpected type
  required: reference
  found:    int
[ERROR] /abc/res/Test.java:[113,49] unexpected type
  required: reference
  found:    int
[ERROR] /abc/res/Test.java:[149,53] unexpected type
  required: reference
  found:    double
[ERROR] /abc/res/Test.java:[154,54] unexpected type
  required: reference
  found:    int
[ERROR] /abc/res/Test.java:[176,48] unexpected type
  required: reference
  found:    double
[ERROR] /abc/res/Test.java:[181,49] unexpected type
  required: reference
  found:    int
[INFO] 8 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.255 s
[INFO] Finished at: 2019-04-07T13:58:02+03:00
[INFO] Final Memory: 39M/219M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project manifold-json-schema-test: Compilation failure: Compilation failure:
[ERROR] /abc/res/Test.java:[210,52] unexpected type
[ERROR] required: reference
[ERROR] found:    double
[ERROR] /abc/res/Test.java:[102,48] unexpected type
[ERROR] required: reference
[ERROR] found:    double
[ERROR] /abc/res/Test.java:[231,53] unexpected type
[ERROR] required: reference
[ERROR] found:    int
[ERROR] /abc/res/Test.java:[113,49] unexpected type
[ERROR] required: reference
[ERROR] found:    int
[ERROR] /abc/res/Test.java:[149,53] unexpected type
[ERROR] required: reference
[ERROR] found:    double
[ERROR] /abc/res/Test.java:[154,54] unexpected type
[ERROR] required: reference
[ERROR] found:    int
[ERROR] /abc/res/Test.java:[176,48] unexpected type
[ERROR] required: reference
[ERROR] found:    double
[ERROR] /abc/res/Test.java:[181,49] unexpected type
[ERROR] required: reference
[ERROR] found:    int
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project manifold-json-schema-test: Compilation failure
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1215)
	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:188)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
@rsmckinney

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

in progress

@rsmckinney rsmckinney added the bug label Apr 8, 2019

rsmckinney added a commit that referenced this issue Apr 8, 2019

Manifold JSON change
- #60
-- regression on primitive list types, ensure component type is boxed regardless of nullability
@rsmckinney

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

Fix ready in release 0.59-alpha

Thanks for report this!

@marksto

This comment has been minimized.

Copy link
Author

commented Apr 8, 2019

@rsmckinney no, sir, thanks to you! For a brilliant project — the Java community was starving for this for years. Will keep reporting.

Cheers,
Mark

@rsmckinney

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

Thanks!

@rsmckinney rsmckinney closed this Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.