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

Support Experimental Lombok Compiler Features #1217

Open
hitman1585 opened this issue Nov 21, 2024 · 12 comments
Open

Support Experimental Lombok Compiler Features #1217

hitman1585 opened this issue Nov 21, 2024 · 12 comments

Comments

@hitman1585
Copy link

I am using Enunciate 2.13.1 and encountering a build failure. The build succeeds if I remove all instances of @requiredargsconstructor(onConstructor_ = @Autowired). Is there any way to resolve this issue?

Thanks

@stoicflame stoicflame added the bug label Nov 21, 2024
@stoicflame stoicflame added this to the 2.19.0 milestone Nov 21, 2024
@stoicflame
Copy link
Owner

What is the error/failure message?

Can you confirm this issue persists with Enunciate 2.18.1?

@hitman1585
Copy link
Author

hitman1585 commented Nov 21, 2024

Getting different error with v2.18.1

error: package jakarta.xml.bind.annotation does not exist
@jakarta.xml.bind.annotation.XmlType (
                            ^

When I skip enunciate compilation works fine.

@stoicflame
Copy link
Owner

So you must be on an old version of Java and J2EE too.

I think we're kinda stuck right now. I need to be able to reproduce the issue on the latest version so narrow in on a fix, but you can't update to the latest version until you update your Java and J2EE stack.

Can you suggest a way forward?

@hitman1585
Copy link
Author

hitman1585 commented Nov 25, 2024

Sorry for the late revert.
I tried using the latest version 2.18.1 in a demo project. It seems to be happening on latest version as well
Screenshot 2024-11-25 at 5 09 23 PM

@stoicflame
Copy link
Owner

Please share the changes you applied to the demo project to see this error.

@hitman1585
Copy link
Author

Please find the dummy project I created. I am new to spring boot so let me know if I am doing something wrong.
demo 2.zip

@stoicflame
Copy link
Owner

The sample project isn't valid; it's not compiling. Make sure the project compiles before applying Enunciate.

@hitman1585
Copy link
Author

My prod project is compiling fine without Enunciate
Looks like there is some issue in demo project. Let me send a new demo project.

@hitman1585
Copy link
Author

The project works correctly when "skip Enunciate" is set to true, but the compilation fails when it is set to false.

Untitled.mov

Demo_latest.zip

@hitman1585
Copy link
Author

@stoicflame Could you please let me know if I am doing something wrong here?

@stoicflame
Copy link
Owner

Looks like you're not doing anything wrong, but you're using an experimental feature in Lombok that the Enunciate compiler doesn't support.

I don't yet understand how Lombok pulls this off or how to add support for it in the Enunciate compiler. The workaround is to use delombok to generate the code and then apply Enunciate to the generated code.

I'll keep this issue open as an enhancement request to look into aligning the Enunciate compiler with the Lombok compiler.

@stoicflame stoicflame removed this from the 2.19.0 milestone Nov 27, 2024
@stoicflame stoicflame changed the title Build Failure due to @RequiredArgsConstructor(onConstructor_ = @Autowired) Support Experimental Lombok Compiler Features Nov 27, 2024
@hitman1585
Copy link
Author

Thanks @stoicflame
I will try the suggested approach

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

No branches or pull requests

2 participants