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

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

Open
codejanovic opened this issue Jul 2, 2023 · 9 comments
Open
Labels

Comments

@codejanovic
Copy link

codejanovic commented Jul 2, 2023

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

@rsmckinney
Copy link
Member

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?

@codejanovic
Copy link
Author

codejanovic commented Jul 3, 2023

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
Copy link
Author

codejanovic commented Jul 3, 2023

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

image image

@rsmckinney
Copy link
Member

The missing type has a pair of $$:

akka.actor.CoordinatedShutdown$tasks$$TaskDefinition$

@codejanovic
Copy link
Author

codejanovic commented Jul 6, 2023

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.

@rsmckinney
Copy link
Member

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.

@codejanovic
Copy link
Author

Just checked that i'm not lying:

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

@rsmckinney rsmckinney added the bug label Aug 10, 2023
@LinSanmu
Copy link

Has this bug been fixed?

@rsmckinney
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants