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

[FEATURE] Document that Lombok needs to be a requires static dependency in module-info #3650

Open
nlisker opened this issue Apr 7, 2024 · 2 comments

Comments

@nlisker
Copy link

nlisker commented Apr 7, 2024

When creating a modular project with Lombok as a dependency, it needs to be added to the module-info.java of the project. However, it needs to be declared as a static dependency:

module mymod {

	requires static lombok;
}

This is not documented anywhere I could see. IDEs will add the module dependency for you when they detect that Lombok classes are used, but they will do so without static. Then when the project is built and run, it will result in a "module lombok not found" error.

Maybe I'm the only one who didn't think about adding static, but I propose that this info be documented. Perhaps as an entry under the "Install" menu on the website, named "module-info" or "modular project", though it's not installation.

@imDaniX
Copy link

imDaniX commented Apr 15, 2024

It is documented on installation page for JavaC.

@nlisker
Copy link
Author

nlisker commented Apr 15, 2024

Alright, but Eclipse doesn't use javac, it uses ECJ, and the handling is the same.

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

2 participants