manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.43k stars 125 forks source link

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

Open codejanovic opened 1 year ago

codejanovic commented 1 year ago

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

Desktop (please complete the following information):

Additional context

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

rsmckinney commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

image image
rsmckinney commented 1 year ago

The missing type has a pair of $$:

akka.actor.CoordinatedShutdown$tasks$$TaskDefinition$

codejanovic commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Just checked that i'm not lying:

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

LinSanmu commented 9 months ago

Has this bug been fixed?

rsmckinney commented 9 months ago

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?