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

Koloboke Fails to Compile on Java 9 #62

Open
danthonywalker opened this issue Nov 7, 2017 · 5 comments
Open

Koloboke Fails to Compile on Java 9 #62

danthonywalker opened this issue Nov 7, 2017 · 5 comments

Comments

@danthonywalker
Copy link

danthonywalker commented Nov 7, 2017

When compiling a project that has previously compiled correctly on Java 8 using Java 9, this exception appears.

Error:(42, 17) java: Koloboke Compile annotation processor threw an exception while processing this type,
  please report this on https://github.com/leventov/Koloboke/issues:
  zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:159)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:226)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2391)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:4727)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:110)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:212)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.PackageBinding.getType(PackageBinding.java:155)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.Scope.findType(Scope.java:1920)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3248)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2940)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:51)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:495)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:586)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:582)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1967)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1516)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.ReferenceBinding.unResolvedMethods(ReferenceBinding.java:1857)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.MethodVerifier.computeInheritedMethods(MethodVerifier.java:539)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.MethodVerifier.computeInheritedMethods(MethodVerifier.java:511)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.MethodVerifier.verify(MethodVerifier.java:1009)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.MethodVerifier15.verify(MethodVerifier15.java:1005)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.MethodVerifier.verify(MethodVerifier.java:1019)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.SourceTypeBinding.verifyMethods(SourceTypeBinding.java:2604)
  	at zzz_koloboke_compile.shaded.org.$eclipse$.jdt.internal.compiler.lookup.CompilationUnitScope.verifyMethods(CompilationUnitScope.java:824)
  	at zzz_koloboke_compile.shaded.$spoon$.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:63)
  	at zzz_koloboke_compile.shaded.$spoon$.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:193)
  	at zzz_koloboke_compile.shaded.$spoon$.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:444)
  	at zzz_koloboke_compile.shaded.$spoon$.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:126)
  	at zzz_koloboke_compile.shaded.$spoon$.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:109)
  	at zzz_koloboke_compile.shaded.$spoon$.Launcher.buildModel(Launcher.java:686)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$ProcessingCxt$GenerationCxt.parallelProcess(KolobokeCollectionProcessor.kt:741)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$ProcessingCxt.parallelProcess(KolobokeCollectionProcessor.kt:358)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$process$2$$special$$inlined$map$lambda$lambda$1.invoke(KolobokeCollectionProcessor.kt:215)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$process$2$$special$$inlined$map$lambda$lambda$1.invoke(KolobokeCollectionProcessor.kt:79)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor.safeTypeProcess(KolobokeCollectionProcessor.kt:232)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor.access$safeTypeProcess(KolobokeCollectionProcessor.kt:79)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$process$2$$special$$inlined$map$lambda$1.call(KolobokeCollectionProcessor.kt:214)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$process$2$$special$$inlined$map$lambda$1.call(KolobokeCollectionProcessor.kt:79)
  	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1431)
  	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:283)
  	at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:395)
  	at java.base/java.util.concurrent.ForkJoinTask.invokeAll(ForkJoinTask.java:834)
  	at zzz_koloboke_compile.shaded.com.koloboke.$jpsg$.concurrent.RealForkJoinTasks.invokeAll(RealForkJoinTasks.kt:30)
  	at zzz_koloboke_compile.shaded.com.koloboke.$jpsg$.concurrent.ForkJoinTasks$Companion.invokeAll(ForkJoinTasks.kt:39)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$process$2.call(KolobokeCollectionProcessor.kt:220)
  	at com.koloboke.compile.processor.KolobokeCollectionProcessor$process$2.call(KolobokeCollectionProcessor.kt:79)
  	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1431)
  	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:283)
  	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1603)
  	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)

The project in question can be cloned from this repository, if it helps.
https://github.com/austinv11/Discord4J

@drivenbyentropy
Copy link

I second this. Do you have plans to support JDK 9 in the future? Thanks for this great project btw!

@leventov
Copy link
Owner

leventov commented Mar 1, 2018

I started works towards open-sourcing Koloboke Compile some time ago. Not sure if I will make it work with Java 9 but at least you will be able to hack on this project.

@drivenbyentropy
Copy link

Thanks for the update.

For now, I have worked around the issue with the following hack. I used Koloboke Compile to generate an implementation for my data structure. I then took the hardcoded version from the generated sources folder and replaced the abstract class with it. Not pretty, but it works and compiles just fine with Java 9.

I will be looking out for updates on open-sourcing Koloboke Compile 👍

@pH14
Copy link

pH14 commented Jul 2, 2019

@leventov were you able to make any progress towards open sourcing Koloboke Compile? Would be interested in making it run on Java >8. The library has been great to work with so far, but we recently moved up in JDKs and now I'm following the same pattern ^

@leventov
Copy link
Owner

I would like to open-source Koloboke Compile, but I'm not sure it will ever happen. If I were you, I would not count on this.

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

4 participants