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] Add support for Eclipse 2024-03 (4.31) #3620

Closed
Rawi01 opened this issue Mar 3, 2024 · 21 comments · Fixed by #3624
Closed

[FEATURE] Add support for Eclipse 2024-03 (4.31) #3620

Rawi01 opened this issue Mar 3, 2024 · 21 comments · Fixed by #3624
Assignees

Comments

@Rawi01
Copy link
Collaborator

Rawi01 commented Mar 3, 2024

Describe the feature
While working on a fix for broken Javadoc in Eclipse, I realised that I needed to add new patches for the upcoming Eclipse release. There also seem to be some changes that might affect the handling of string literals and delegate methods. I created this issue to track the fixed stuff and allow everyone to report additional problems in the same place.

Describe the target audience
Everyone who wants to use Eclipse 2024-03 (release date is 13.03.2024).

Latest pipeline build
lombok.jar

@Rawi01 Rawi01 self-assigned this Mar 3, 2024
@famod
Copy link

famod commented Mar 11, 2024

FTR, I suppose this is one of those issues:

Lombok annotation handler class lombok.eclipse.handlers.HandleToString failed
java.lang.NoSuchMethodError: 'java.lang.StringBuffer org.eclipse.jdt.internal.compiler.ast.Expression.print(int, java.lang.StringBuffer)'
  	at lombok.eclipse.handlers.EclipseHandlerUtil.createAnnotation(EclipseHandlerUtil.java:1335)
  	at lombok.eclipse.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:105)
  	at lombok.eclipse.HandlerLibrary.handleAnnotation(HandlerLibrary.java:237)
  	at lombok.eclipse.TransformEclipseAST$AnnotationVisitor.visitAnnotationOnType(TransformEclipseAST.java:265)
  	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:107)
  	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
  	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:74)
  	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
  	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:69)
  	at lombok.eclipse.EclipseAST.traverse(EclipseAST.java:224)
  	at lombok.eclipse.TransformEclipseAST.go(TransformEclipseAST.java:222)
  	at lombok.eclipse.TransformEclipseAST.transform(TransformEclipseAST.java:183)
  	at lombok.eclipse.TransformEclipseAST.transform_swapped(TransformEclipseAST.java:107)
  	at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
        [...]

@Rawi01 there's a typo in the issue title: 2024-04 -> 2024-03 🙂

@Rawi01 Rawi01 changed the title [FEATURE] Add support for Eclipse 2024-04 (4.31) [FEATURE] Add support for Eclipse 2024-03 (4.31) Mar 11, 2024
@Rawi01
Copy link
Collaborator Author

Rawi01 commented Mar 11, 2024

@famod Ups, fixed. This error is already fixed in the latest edge release.

@famod
Copy link

famod commented Mar 11, 2024

Good to know, thanks!

@c-koell
Copy link

c-koell commented Mar 14, 2024

@Rawi01 thanks for the patch !
For me it seems that the pipeline build contains other fixes like #3529
The edge release does not contain this particular fix.

Hopyfully a official release is coming soon .. thanks

@dpolivaev
Copy link

dpolivaev commented Mar 14, 2024

Please fix it. Urgently. I have to rollback my eclipse now.

Update: lombok.jar version linked to the opening message fixed it for me.

@chrylis
Copy link

chrylis commented Mar 14, 2024

Eclipse 4.31 is rolling out, so a release with the Eclipse fix (which works for me!) would be appreciated.

@ksanjeev9211
Copy link

lombok.jar version linked to the opening message fixed it for me also.
I was getting issues with 'Accessors(fluent=true)'

@jdimeo
Copy link

jdimeo commented Mar 15, 2024

Yay for a strong community around Lombok that it gets dogpiled the moment it breaks :-)

@mgsCatDev
Copy link

Its a shame not to have more support when all is running ok, but, eh, this way you know you are important. Deep, very deep inside our developments, Lombok it's an indispensable part.
Long live Lombok!

@odrotbohm
Copy link

I also still see a compile error when using @__(…) on the edge builds. The actual error message is "__ cannot be resolved to a type".

Screenshot 2024-03-18 at 10 22 49

@rspilker
Copy link
Collaborator

This is part of the latest edge release, all feedback is welcome.

@nlisker
Copy link

nlisker commented Mar 28, 2024

With Eclipse Version: 2024-03 (4.31) and Lombok 1.18.32, the following gives an error:

@FieldDefaults(level = AccessLevel.PRIVATE)
public class A{}

Lombok visitor handler class lombok.eclipse.handlers.HandleFieldDefaults failed - See error log.

Not sure where the error log is, but it should be easy enough to reproduce.


By the way, there is a discrepancy between the Lombok version shown in the installation details
image
and the one shown in the About section
image

@danthe1st
Copy link

@nlisker You can view the error log using Window>Show View>Error Log.

@nlisker
Copy link

nlisker commented Mar 28, 2024

I looked, the error doesn't appear there.

@MichaelNesterenko
Copy link

I experience issues with 1.8.32 version within vscode:

Apr 5, 2024, 3:52:00 PM Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed
'void org.eclipse.jdt.internal.compiler.ast.CaseStatement.<init>(org.eclipse.jdt.internal.compiler.ast.Expression, int, int)'
java.lang.NoSuchMethodError: 'void org.eclipse.jdt.internal.compiler.ast.CaseStatement.<init>(org.eclipse.jdt.internal.compiler.ast.Expression, int, int)'
	at lombok.eclipse.Eclipse.createCaseStatement(Eclipse.java:285)
	at lombok.eclipse.handlers.singulars.EclipseJavaUtilListSingularizer.appendBuildCode(EclipseJavaUtilListSingularizer.java:75)
	at lombok.eclipse.handlers.HandleBuilder.generateBuildMethod(HandleBuilder.java:821)
	at lombok.eclipse.handlers.HandleBuilder.handle(HandleBuilder.java:563)
	at lombok.eclipse.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:106)
	at lombok.eclipse.HandlerLibrary.handleAnnotation(HandlerLibrary.java:237)
	at lombok.eclipse.TransformEclipseAST$AnnotationVisitor.visitAnnotationOnType(TransformEclipseAST.java:269)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:107)
	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:74)
	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:74)
	at lombok.eclipse.EclipseAST.traverseChildren(EclipseAST.java:231)
	at lombok.eclipse.EclipseNode.traverse(EclipseNode.java:69)
	at lombok.eclipse.EclipseAST.traverse(EclipseAST.java:224)
	at lombok.eclipse.TransformEclipseAST.go(TransformEclipseAST.java:226)
	at lombok.eclipse.TransformEclipseAST.transform(TransformEclipseAST.java:187)
	at lombok.eclipse.TransformEclipseAST.transform_swapped(TransformEclipseAST.java:104)
	at jdk.internal.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at lombok.launch.PatchFixesHider$Util.invokeMethod(PatchFixesHider.java:146)
	at lombok.launch.PatchFixesHider$Transform.transform_swapped(PatchFixesHider.java:272)
	at org.eclipse.jdt.internal.compiler.parser.Parser.endParse(Parser.java:11535)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12736)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12966)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12923)
	at org.eclipse.jdt.internal.compiler.parser.SourceTypeConverter.convert(SourceTypeConverter.java:154)
	at org.eclipse.jdt.internal.compiler.parser.SourceTypeConverter.buildCompilationUnit(SourceTypeConverter.java:99)
	at org.eclipse.jdt.internal.core.hierarchy.HierarchyResolver.resolve(HierarchyResolver.java:741)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.buildForProject(IndexBasedHierarchyBuilder.java:252)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.buildFromPotentialSubtypes(IndexBasedHierarchyBuilder.java:337)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.build(IndexBasedHierarchyBuilder.java:153)
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute(TypeHierarchy.java:323)
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1281)
	at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:94)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:740)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:805)
	at org.eclipse.jdt.internal.core.SourceType.newTypeHierarchy(SourceType.java:954)
	at org.eclipse.jdt.internal.core.SourceType.newTypeHierarchy(SourceType.java:911)
	at org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor.getCachedTypeHierarchy(ChangeSignatureProcessor.java:718)
	at org.eclipse.jdt.internal.corext.refactoring.structure.ChangeSignatureProcessor.checkInitialConditions(ChangeSignatureProcessor.java:737)
	at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceParameterRefactoring.checkInitialConditions(IntroduceParameterRefactoring.java:220)
	at org.eclipse.jdt.ls.core.internal.text.correction.RefactorProposalUtility.getIntroduceParameterRefactoringProposals(RefactorProposalUtility.java:914)
	at org.eclipse.jdt.ls.core.internal.corrections.RefactorProcessor.getIntroduceParameterProposals(RefactorProcessor.java:172)
	at org.eclipse.jdt.ls.core.internal.corrections.RefactorProcessor.getProposals(RefactorProcessor.java:158)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:187)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$14(JDTLanguageServer.java:765)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

looks like error is exposed when @Singular annotation is used:

@Data
    @Builder
    public static class References {
        @Singular
        private List<Reference> references;
    }

@nlisker
Copy link

nlisker commented Apr 5, 2024

@MichaelNesterenko Not sure about VScode, but with Eclipse there's this problem: #3621. See if you can do a manual installation since they the automatic one seems to have a problem for some people.

@MichaelNesterenko
Copy link

MichaelNesterenko commented Apr 5, 2024

@nlisker, vscode manages plugin installation internally. From what I see issue is with the specific annotation processing, not with plugin installation

@MichaelNesterenko
Copy link

MichaelNesterenko commented Apr 9, 2024

just checked history of eclipse CaseStatement, looks like they removed used constructor which is referenced from lombok codebase: eclipse-jdt/eclipse.jdt.core@cb6774f#diff-8e041ce587fb0bca24f1616b0dc3e47ac497e17030f24a7865a04cb0c3dd921dL54

@gjevardat
Copy link

Thanks the version provided fixes the issue.
I notice version is documented as 1.18.31 in eclipse About Window. Is it expected ?
Also any idea of a release date ?
Thanks :)

@janrieke
Copy link
Contributor

No. You probably installed an outdated edge build. Use the latest v1.18.32 release, it includes this fix.

@gjevardat
Copy link

No. You probably installed an outdated edge build. Use the latest v1.18.32 release, it includes this fix.

Ok thanks it works.

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.