lombok-intellij-plugin: IntelliJ 2020.2 PluginException : Psi is outdated
Short description
May be similar to another question #827 #821
Version information
- IDEA Version: IntelliJ IDEA 2020.2 Beta Build #IU-202.6250.13
- JDK Version: IDE JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. local java version “1.8.0_202”
- OS Type & Version: Windows 10
- Lombok Plugin Version: 0.30-2020.2EAP
- Lombok Dependency Version: lombok:1.18.8
Steps to reproduce
What steps do we need to take to reproduce this issue? Oh, I have no good way reproduce this issue
Additional information
Is there any additional information you can provide to help us understanding and solving the issue?
Stacktrace
2020-07-10 15:20:29,746 [3918732] ERROR - n.impl.GeneralHighlightingPass - IntelliJ IDEA 2020.2 Beta Build #IU-202.6250.13
2020-07-10 15:20:29,746 [3918732] ERROR - n.impl.GeneralHighlightingPass - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-07-10 15:20:29,746 [3918732] ERROR - n.impl.GeneralHighlightingPass - OS: Windows 10
2020-07-10 15:20:29,747 [3918733] ERROR - n.impl.GeneralHighlightingPass - Last Action: EditorUp
2020-07-10 15:20:29,759 [3918745] ERROR - aemon.impl.PassExecutorService - Element: class de.plushnikov.intellij.plugin.psi.LombokLightMethodBuilder #JAVA because: psi is outdated
invalidated at: no info [Plugin: Lombook Plugin]
com.intellij.diagnostic.PluginException: Element: class de.plushnikov.intellij.plugin.psi.LombokLightMethodBuilder #JAVA because: psi is outdated
invalidated at: no info [Plugin: Lombook Plugin]
at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:67)
at com.intellij.psi.util.PsiUtilCore.ensureValid(PsiUtilCore.java:478)
at com.intellij.psi.impl.PsiClassImplUtil.lambda$createMembersMap$4(PsiClassImplUtil.java:346)
at com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
at com.intellij.psi.impl.PsiClassImplUtil$MembersMap.get(PsiClassImplUtil.java:326)
at com.intellij.psi.impl.PsiClassImplUtil$MembersMap.access$000(PsiClassImplUtil.java:318)
at com.intellij.psi.impl.PsiClassImplUtil.getMap(PsiClassImplUtil.java:175)
at com.intellij.psi.impl.PsiClassImplUtil.getAllByMap(PsiClassImplUtil.java:166)
at com.intellij.psi.impl.PsiClassImplUtil.getAllMethods(PsiClassImplUtil.java:58)
at com.intellij.psi.impl.source.PsiClassImpl.getAllMethods(PsiClassImpl.java:335)
at org.jetbrains.plugins.cucumber.java.CucumberJavaUtil.isStepDefinitionClass(CucumberJavaUtil.java:173)
at org.jetbrains.plugins.cucumber.java.steps.reference.CucumberJavaImplicitUsageProvider.isImplicitUsage(CucumberJavaImplicitUsageProvider.java:15)
at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isImplicitUsage(UnusedSymbolUtil.java:42)
at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isReallyUsed(UnusedSymbolUtil.java:300)
at com.intellij.codeInsight.daemon.impl.UnusedSymbolUtil.isClassUsed(UnusedSymbolUtil.java:289)
at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.processClass(PostHighlightingVisitor.java:466)
at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.processIdentifier(PostHighlightingVisitor.java:225)
at com.intellij.codeInsight.daemon.impl.analysis.PostHighlightingVisitor.collectHighlights(PostHighlightingVisitor.java:144)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.lambda$analyze$1(HighlightVisitorImpl.java:212)
at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder.analyze(RefCountHolder.java:362)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:208)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:300)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:300)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:96)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:300)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:268)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:214)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:80)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:399)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:392)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: com.intellij.psi.PsiInvalidElementAccessException: Element: class de.plushnikov.intellij.plugin.psi.LombokLightMethodBuilder #JAVA because: psi is outdated
invalidated at: no info
... 46 more
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 97
- Comments: 73 (7 by maintainers)
Commits related to this issue
- Consider navigation element in PSI equality checks This seems to solve issues related to psi becoming outdated. Extension of comment by ajchun: https://github.com/mplushnikov/lombok-intellij-plugin/i... — committed to GingerGeek/lombok-intellij-plugin by GingerGeek 4 years ago
- Consider navigable element in equality - seems to fix psi outdated (#860) * Consider navigation element in PSI equality checks This seems to solve issues related to psi becoming outdated. Extensi... — committed to mplushnikov/lombok-intellij-plugin by GingerGeek 4 years ago
- Experimenting with psi validation for "psi is outdated" issues #829 #840 — committed to mplushnikov/lombok-intellij-plugin by mplushnikov 4 years ago
- Removed wrong previous fix with isValid() calls in equals The root issue was fixed in IntelliJ core, see: https://youtrack.jetbrains.com/issue/IDEA-248146 #829 #840 — committed to mplushnikov/lombok-intellij-plugin by mplushnikov 4 years ago
It looks like it is not compatible with the latest IntelliJ version (2020.2). I will look at it after my vacation in August.
There are no fix at the moment. One of IntelliJ caches looks like broken. I’m waiting for comming change (Build: 202.7023) from Jetbrains in https://youtrack.jetbrains.com/issue/IDEA-248146 to verify if it fix the problem.
For me, it was more productive to downgrade IntelliJ to 2020.1 until this issue is solved. JetBrains Toolbox is really helpful to control their IDE versions. By the way thanks for this great plugin
IntelliJ IDEA 2020.2.1 RC Build #IC-202.6948.36, built on August 18, 2020 is available and it looks like lombok plugin is working again!
/rant on
I don’t get it why people keep spamming the same stacktrace over and over and over again, or opening new issues without bothering to check whether there is already something at least remotely similar to their problem, either in open or closed state, and whether there is already a workaround or a stable solution suggested. It’s like this IDE is not used by software engineers that know how issue tracking tools work.
Literally posted 3h ago, just a tad above in the thread:
… and also before that
… plus:
You have all the information available, use it!
/rant off
Hi, fyi I have just installed IDEA 2020.2.1 RC, which includes the fix for https://youtrack.jetbrains.com/issue/IDEA-248146
I have tried several times to refactor lombok annotated classes/fields and I don’t have problems anymore.
Is it just me reading the entitlement in the tone above? It’s free software, fix it yourself if it’s such a big pain.
26 days later, it’s not solved yet IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020
JetBrains is trying to promote Kotlin by not providing native support for Lombok
Guys could you please stop posting similar stacktraces? All of us who’s subscribed to this issue are getting a lot of notifications for nothing. The solution was posted above: try IDEA 2020.2.1 RC. Also, Jetbrains confirmed that most probably the issue is on their side, so why not to post the stacktraces in YouTrack? There is a chance that a lot of users that are searching for the solution just can’t find it, as this issue has too many comments.
For those who’s searching for solution An issue was raised in Jetbrains YouTrack: https://youtrack.jetbrains.com/issue/IDEA-248146. Jetbrains developer(s) said that some caching mechanism seemed broken, so they implemented a fix. This fix is included in IDEA 2020.2.1, which hasn’t been released at the moment, but you can update to Release Candidate.
And the plugin’s author said it helped:
I also confirm that updating to 2020.2.1RC helped me as well.
@GingerGeek I merged your PR at first, but this issue still need more investigation.
Just created a ticket on jetbrains https://youtrack.jetbrains.com/issue/IDEA-248146, to get some ideas to fix this issue.
Still occurs IntelliJ IDEA 2020.2 (Ultimate Edition) Lombok 0.30-EAP
Same problem with release 202.6397.94
Any ETA for a fix?
This worked for me very well, I didn’t have to add the annotation again, so just refactor->rename class->keep the same name (or simple shift+f6 then hit enter), and all is working fine again.
Actually I’m wrong. I still get PSI errors 😦 I got somewhat less PSI errors.
Seems like the plugin is still not working fully with 2020.2.1 RC:
I just changed the object type of a private final field of a class annotated with
@RequiredArgsConstructor.Anyway, it’s quite a big reason to ask the JetBrains team to make Lombok support be native in their IDE instead of a plugin one. They do that support for Micronaut, Quarkus, and especially Spring. So why do they ignore Lombok, which is extremely widely used?
The Idea verion 2020.2.1 has already figure out this problem yet!!!
I could confirm the Idea version 2020.2.1 seems to not have this issue (tried on Linux and Windows 10). EAP version of the plugin is working as expected…
2020.2.1 RC can also be found here: https://confluence.jetbrains.com/display/IDEADEV/IDEA+2020.2+latest+builds Release notes: https://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+2020.2+EAP+(202.6948.36+build)+Release+Notes
I like Lombok but I agree this makes sense. I personally would prefer to work in Scala or Kotlin or any such language over Java, but we have repositories with legacy code. Fortunately Java has made some improvements (for example - the Record type in Java 13 which is a simple POJO). So as time goes on, if the trend continues - Lombok will be less critical for Java development, and that should hopefully resolve this strong dependency we have on it now.
If ya’ll want to trust binaries by randos on the internet, I’ve released it here 😃
https://github.com/dkowis/lombok-intellij-plugin/releases/tag/2020.2-dkowis
You can just use 0.30-EAP version, this should be compatible and available to download from plugin-center in IntelliJ. If you are updating from previous version, and don’t see it available, then remove old lombok plugin and just install it again.
Having Same issue. Had to downgrade Intellij and Lombok to older version
Same problem Version information IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020 Runtime version: 11.0.7+10-b944.20 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. local java version : 1.8.0_162 Windows 10 Lombok Plugin Version: 0.30-EAP
It was a general comment, not directly targeting you, apologies if it left that impression. Nonetheless, to provide you with a reply, looking at the closed issues, there are what, about 20 duplicates on the first page related to 829 & 840!? Looking in more detail, #883 is awfully similar to yours. Albeit the stacktrace is not exactly the same, but it leads me to believe it might be the same issue after all. I could be wrong tho.
If I may make a suggestion, in the future, you could start with the below, instead of simply saying “same issue on my side”. This would provide “some context” as to the fact that you have a similar issue that may not have been covered, overlooked somehow, etc:
Anyway, I have nothing constructive to add to this thread, nor do I want to pollute it further or turn it into a flame-war of sorts, so I will refrain from further comments. I apologize for wasting your time and for the mail spam, and have a nice day everyone.
P.S. this message will self delete by EOD.
Same issue occured. Just FYI
My environment
Windows 10 (2004 build 19041.388)
IntelliJ IDEA 2020.2 (Community Edition) Build #IC-202.6397.94, built on July 27, 2020 Runtime version: 11.0.7+10-b944.20 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 1996M Cores: 4 Non-Bundled Plugins: com.alayouni.ansiHighlight, com.intellij.ideolog, Lombook Plugin, gherkin, cucumber-java, org.jetbrains.plugins.hocon, Docker, org.intellij.scala
Lombok plugin: 0.30-EAP
I have this problem too.
com.intellij.diagnostic.PluginException: Element: class de.plushnikov.intellij.plugin.psi.LombokLightMethodBuilder #JAVA because: psi is outdated
@sheiy https://github.com/mplushnikov/lombok-intellij-plugin/issues/829#issuecomment-660442053
It happened manys time , When I try to use Shift+F6 to turn the class field name, it will happen 。I known a way just remove lombok’s annotation before use Shift+F6 , and then add the annotation again. In this way, this exception will not happen.
Same problem with the release candidate (build 202.6397.59)