Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 572304

Summary: [refactor][lombok] Lombok generated logger with custom name cannot be resolved during local variable extraction
Product: [Eclipse Project] JDT Reporter: Giacomo Baso <giacomo.baso>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: derJoerg, lhozdroid, loskutov
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Giacomo Baso CLA 2021-03-25 11:46:44 EDT
Using lombok (latest, v1.18.18) to generate loggers with @Slf4j with custom name "logger" (default is log) results in an problem every time I extract a local variable: "logger cannot be resolved". Clicking "continue" the extraction is performed successfully, but the problem window slows down the operation considerably.

lombok.config:
lombok.log.fieldName=logger
Comment 1 Giacomo Baso CLA 2021-06-14 11:42:27 EDT
Issue still present in Eclipse 2021-06
Comment 2 Luis Salas CLA 2023-03-21 10:06:35 EDT
Happening again after 23-03 (4.27.0) update. Using Lombok 1.18.24
Comment 3 Jörg van der Vlies CLA 2023-03-22 08:40:45 EDT
Same here. Happens with Eclipse version 2023-03 (4.27.0) and lombok version 1.18.26.
Lombok is processed. I can see the generated logger object in the outline view, but it has the wrong name. So this particular setting is apparently not respected.
Comment 4 Andrey Loskutov CLA 2023-03-22 09:03:02 EDT
Two notes: 

1) please report the issue to Lombok, this is the (old) bug tracker of JDT which has no relationship to Lombok at all.

2) If you believe this *is* JDT issue, please create a bug with *detailed* description how to reproduce and why this is a JDT problem at https://github.com/eclipse-jdt/eclipse.jdt.core/issues/
Comment 5 Jörg van der Vlies CLA 2023-03-22 10:46:31 EDT
thanks for your comment. I thought it was probably a regression, but there is indeed an open issue at lombok right now which fits:

https://github.com/projectlombok/lombok/issues/3332

kind regards