soywiz-archive / gdx-backend-jtransc

GDX backend for JTransc: targeting every platform lime supports (html5, windows, linux, mac, android, ios...) (flash is wip) (consoles + unity likely to be supported in the future)
23 stars 6 forks source link

Cryptic compilation error #13

Closed czyzby closed 8 years ago

czyzby commented 8 years ago
Execution failed for task ':jtransc:distJs'.
> com.jtransc.error.InvalidOperationException: Can't handle value java.lang.Boolean : false while generating com.github.czyzby.autumn.mvc.component.ui.InterfaceService::<clinit>

Not sure what's causing this or why can't it "handle the value". The class source is here.

soywiz commented 8 years ago

To get more info:

-s, --stacktrace        Print out the stacktrace for all exceptions.
-i, --info              Set log level to info.```
gradle -i -s distJs

I should run the top-level build.gradle? or just the /mvc one?

czyzby commented 8 years ago

https://github.com/gdx-libs/gdx-transc-test

czyzby commented 8 years ago

Just make sure to run Gradle with --refresh-dependencies, as I'm constantly updating the gdx-autumn-jtransc that I'm currently working on. It will provide automatic component scanning and dependency injection for JTransc LibGDX applications.

By the way, is JTransc 0.2.8 compiled with Java 8? I'm unable to run JTransc Java application with JRE 1.7 (which seems to be the lowest available target version for LWJGL):

Caused by: java.lang.UnsupportedClassVersionError: com/jtransc/reflection/JTranscReflection : Unsupported major.minor version 52.0

I had to switch it to 1.8 to make it work.

czyzby commented 8 years ago

Complete stack trace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':jtransc:runJs'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:68)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.internal.UncheckedException: com.jtransc.error.InvalidOperationException: Can't handle value java.lang.Boolean : false while generating com.github.czyzby.autumn.mvc.component.ui.InterfaceService::<clinit>
    at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:45)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 68 more
Caused by: com.jtransc.error.InvalidOperationException: Can't handle value java.lang.Boolean : false while generating com.github.czyzby.autumn.mvc.component.ui.InterfaceService::<clinit>
    at com.jtransc.error.ErrorsKt.invalidOp(errors.kt:37)
    at com.jtransc.gen.haxe.GenHaxeGen$annotation$1.invoke(haxe_gen.kt:200)
    at com.jtransc.gen.haxe.GenHaxeGen.annotation(haxe_gen.kt:205)
    at com.jtransc.gen.haxe.GenHaxeGen.visibleAnnotations(haxe_gen.kt:228)
    at com.jtransc.gen.haxe.GenHaxeGen$dumpClassInfo$1$1.invoke(haxe_gen.kt:253)
    at com.jtransc.gen.haxe.GenHaxeGen$dumpClassInfo$1$1.invoke(haxe_gen.kt:31)
    at com.jtransc.text.Indenter.line(indent.kt:99)
    at com.jtransc.gen.haxe.GenHaxeGen$dumpClassInfo$1.invoke(haxe_gen.kt:241)
    at com.jtransc.gen.haxe.GenHaxeGen$dumpClassInfo$1.invoke(haxe_gen.kt:31)
    at com.jtransc.text.Indenter$Companion.gen(indent.kt:41)
    at com.jtransc.text.Indenter$Companion.genString(indent.kt:37)
    at com.jtransc.gen.haxe.GenHaxeGen.dumpClassInfo(haxe_gen.kt:239)
    at com.jtransc.gen.haxe.GenHaxeGen$writeClass$classCodeIndenter$1$1.invoke(haxe_gen.kt:951)
    at com.jtransc.gen.haxe.GenHaxeGen$writeClass$classCodeIndenter$1$1.invoke(haxe_gen.kt:31)
    at com.jtransc.text.Indenter.line(indent.kt:99)
    at com.jtransc.gen.haxe.GenHaxeGen$writeClass$classCodeIndenter$1.invoke(haxe_gen.kt:905)
    at com.jtransc.gen.haxe.GenHaxeGen$writeClass$classCodeIndenter$1.invoke(haxe_gen.kt:31)
    at com.jtransc.text.Indenter$Companion.gen(indent.kt:41)
    at com.jtransc.gen.haxe.GenHaxeGen.writeClass(haxe_gen.kt:887)
    at com.jtransc.gen.haxe.GenHaxeGen._write$jtransc_gen_haxe(haxe_gen.kt:114)
    at com.jtransc.gen.haxe.HaxeGenTargetProcessor.buildSource(haxe.kt:293)
    at com.jtransc.gen.GenKt.build(gen.kt:49)
    at com.jtransc.AllBuild._buildAndRun(build.kt:136)
    at com.jtransc.AllBuild.buildAndRunRedirecting(build.kt:76)
    at com.jtransc.gradle.tasks.JTranscRunTask.task(JTranscRunTask.kt:15)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    ... 75 more
soywiz commented 8 years ago

https://github.com/jtransc/jtransc/blob/ce7cf184da1a76dfa06d2072847880826602aef3/jtransc-gen-haxe/src/com/jtransc/gen/haxe/haxe_gen.kt#L185

Cool. It seems that I missed Boolean here :) It should be an easy fix. I will create a failing test for this one.

soywiz commented 8 years ago

Please, check if it is fixed. You should clone/pull jtransc repo and do a mvn install -DskipTests so it installs for you. Then try again. Reopen if still fails.