projectlombok / lombok

Very spicy additions to the Java programming language.
https://projectlombok.org/
Other
12.86k stars 2.38k forks source link

[BUG][REG 1.18.32] A required class was missing while executing org.eclipse.tycho:tycho-compiler-plugin:4.0.7:compile: org/eclipse/jdt/internal/compiler/parser/Parser #3684

Open bllngr opened 4 months ago

bllngr commented 4 months ago

Describe the bug Compiling a test project with Tycho 4.0.7 and Lombok (both 1.18.32 and edge) fails with an error:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.7:compile (default-compile) on project com.vogella.logging.config: Execution default-compile of goal org.eclipse.tycho:tycho-compiler-plugin:4.0.7:compile failed: A required class was missing while executing org.eclipse.tycho:tycho-compiler-plugin:4.0.7:compile: org/eclipse/jdt/internal/compiler/parser/Parser
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.eclipse.tycho:tycho-compiler-plugin:4.0.7
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/D:/.m2/repository/org/eclipse/tycho/tycho-compiler-plugin/4.0.7/tycho-compiler-plugin-4.0.7.jar
[ERROR] urls[1] = [...]

To Reproduce

git clone https://github.com/bllngr/tycho-lombok-example
cd tycho-lombok-example
git switch lombok
export MAVEN_OPTS="-javaagent:${PWD}/bundles/org.projectlombok.lombok/lombok-1.18.32.jar"
mvn clean install -DskipTests

Expected behavior Compilation succeeds without errors.

Version info (please complete the following information):

Additional context With older Lombok versions like 1.18.30, compilation succeeds (and then fails at the materialize step, but this is a problem with the project and not Lombok)

Olli-Lolli commented 1 month ago

I have the same issue with the current version and I was able to identify the commit d6ee06c5 as the one which broke it.

bllngr commented 1 month ago

Sorry, I completely forgot about this issue. We've since solved the issue by adding some dependencies to pom.xml. I don't know which exactly where responsible, but on of those must have solved it:

Could you test it and report back here? If it works, I'll update my example.

ChristianHoesel commented 3 weeks ago

@bllngr I can confirm, that your additions are working, but I would call this a workaround