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

[BUG] Incorrect test output for logger + records #3327

Closed
Rawi01 opened this issue Jan 11, 2023 · 1 comment · Fixed by #3330
Closed

[BUG] Incorrect test output for logger + records #3327

Rawi01 opened this issue Jan 11, 2023 · 1 comment · Fixed by #3330

Comments

@Rawi01
Copy link
Collaborator

Rawi01 commented Jan 11, 2023

Describe the bug
The first parameter of all tests with loggers on records is wrong.

This happens because lombok adds the generated logger field as first child but eclipse expects that the record components are the first fields. I don't think that this affects the actual compilation result.

I also noticed that the output is different in recent eclipse versions, we may need to introduce a new directive to handle that.

To Reproduce

public @Slf4j record LoggerSlf4jOnRecord(org log, String a) {

Expected behavior
The generated compact construct only contains the record components.

@rzwitserloot
Copy link
Collaborator

Yup, eclipse belatedly fixing their prettyprinter is rather annoying. An alternative solution is that we take the current eclipse pretty printer which is pretty nice, and include it directly in the lombok test suite, so that we always use this (instead of 'whatever the prettyprinter is that ships with the ecj/eclipse version we are testing right now), and thus avoid having to add more directives.

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

Successfully merging a pull request may close this issue.

2 participants