manifold icon indicating copy to clipboard operation
manifold copied to clipboard

java compiler error (class not found) when using scala dependency

Open codejanovic opened this issue 2 years ago • 9 comments

Describe the bug When using Akka within a project that has manifold configured, the compiler throws the following error:

An exception has occurred in the compiler (17.0.7). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com/) after checking the Bug Database (https://bugs.java.com/) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for akka.actor.CoordinatedShutdown$tasks$$TaskDefinition$ not found

To Reproduce I forked the manifold-sample-project and added the akka dependency + a sample class using akka to reproduce the error: https://github.com/codejanovic/manifold-sample-project

Expected behavior I expected the project to compile correctly.

Screenshots

  • Build success without akka dependency: here
  • Build failed with akka dependency: here

Desktop (please complete the following information):

  • OS Type & Version: MacOS / Github Action llinux
  • Java/JDK version: 17
  • IDE version (IntelliJ IDEA or Android Studio): 2023.1.3
  • Manifold version: 2023.1.10
  • Manifold IntelliJ plugin version: 2023.1.10

Additional context

Stack trace https://github.com/codejanovic/manifold-sample-project/actions/runs/5435818146/jobs/9885221065

codejanovic avatar Jul 02 '23 09:07 codejanovic

That is a confusing naming convention with akka/scala -- Name vs. Name$ etc. I'm not sure what is going on exactly, but it appears the akka.actor.CoordinatedShutdown$tasks$$TaskDefinition$ class is indeed missing from the jar or is otherwise not available, however it manifests. Perhaps there is another akka related jar dependency that defines it?

rsmckinney avatar Jul 03 '23 04:07 rsmckinney

You are right, the type akka.actor.CoordinatedShutdown$tasks$$TaskDefinition$ exists within the scala code of akka, but i am also unable to find it within the jar. I will try to find out what is happening here and report back! Thanks for the fast response

codejanovic avatar Jul 03 '23 14:07 codejanovic

It looks like the classes are not referenced in IntelliJ, but definetely present in the jar:

image image

codejanovic avatar Jul 03 '23 14:07 codejanovic

The missing type has a pair of $$:

akka.actor.CoordinatedShutdown$tasks$$TaskDefinition$

rsmckinney avatar Jul 06 '23 13:07 rsmckinney

Is there anything i can help investigate with? Is there somewhere a contribution guide or sth like that? Didnt touch compiler plugins yet.

Although the compiler complains about ...$tasks$$TaskDefinition$, it works lilke a charme when manifold is not configured.

codejanovic avatar Jul 06 '23 17:07 codejanovic

it works lilke a charme when manifold is not configured

Good point. It must be something on my end. I’ll have another look at this.

rsmckinney avatar Jul 06 '23 19:07 rsmckinney

Just checked that i'm not lying:

manifold disabled -> compiles: commit manifold enabled -> wont compile: commit

codejanovic avatar Jul 06 '23 20:07 codejanovic

Has this bug been fixed?

LinSanmu avatar Feb 28 '24 12:02 LinSanmu

Hi @LinSanmu. Sorry, no it’s an issue that unfortunately fell by the wayside. I’ll put it back on my stack. Are you experiencing the same problem?

rsmckinney avatar Feb 28 '24 14:02 rsmckinney