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

Missing generatedSourceOutputDirectory for delombok sourcepath #1301

Open
AlexProgrammerDE opened this issue Feb 14, 2025 · 0 comments
Open

Comments

@AlexProgrammerDE
Copy link

Hi, I'm using immutables in my app alongside delombok.
When I compile my app the delombok task outputs these error messages:

10:12:48 /home/jenkins/workspace/AlexProgrammerDE/SoulFire/server/src/main/java/com/soulfiremc/server/plugins/AutoEat.java:27: error: cannot find symbol
10:12:48 import com.soulfiremc.server.settings.property.ImmutableBooleanProperty;
10:12:48                                               ^
10:12:48   symbol:   class ImmutableBooleanProperty
10:12:48   location: package com.soulfiremc.server.settings.property
10:12:48 /home/jenkins/workspace/AlexProgrammerDE/SoulFire/server/src/main/java/com/soulfiremc/server/plugins/AutoEat.java:28: error: cannot find symbol
10:12:48 import com.soulfiremc.server.settings.property.ImmutableMinMaxProperty;
10:12:48                                               ^
10:12:48   symbol:   class ImmutableMinMaxProperty
10:12:48   location: package com.soulfiremc.server.settings.property
10:12:48 /home/jenkins/workspace/AlexProgrammerDE/SoulFire/server/src/main/java/com/soulfiremc/server/plugins/AutoReconnect.java:26: error: cannot find symbol
10:12:48 import com.soulfiremc.server.settings.property.ImmutableBooleanProperty;
10:12:48                                               ^
10:12:48   symbol:   class ImmutableBooleanProperty
10:12:48   location: package com.soulfiremc.server.settings.property
10:12:48 /home/jenkins/workspace/AlexProgrammerDE/SoulFire/server/src/main/java/com/soulfiremc/server/plugins/AutoReconnect.java:27: error: cannot find symbol
10:12:48 import com.soulfiremc.server.settings.property.ImmutableMinMaxProperty;
10:12:48                                               ^
10:12:48   symbol:   class ImmutableMinMaxProperty
10:12:48   location: package com.soulfiremc.server.settings.property
...and many more files....

This is because delombok is missing generated sources by annotation processors in the sourcepath. I've fixed these error messages by doing:

tasks {
  delombok {
    sourcepath.setFrom(sourcepath.plus(compileJava.get().options.generatedSourceOutputDirectory))
  }
}

in my buildscript. I'd like to ask that the generated source output directory should also be added to the sourcepath by default.

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

1 participant