-
Notifications
You must be signed in to change notification settings - Fork 50
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
java.lang.IllegalStateException: Constraint inSmartMode cannot be satisfied #1373
Comments
is your project public? We're having a hard time reproducing this problem. |
I can make it public but I don't think it will help, as the issue is not repeatable on demand also by me (and the project is very very basic so probably it doesn't matter). When it happens it's unexpected, and when I try to repeat it - opening the project again - I cannot. |
Managing correctly lsp features when IJ is opening is a real nightmare because IJ indexes a lot of thing but it call too some feature when editor is opened like validation, codelens document link, etc. With IJ Quarkus it is harder because codelens, validation etc requires to visit java classes to collect data model like properties for application.properties, java data model for qute etc which must be done sometimes when project is indexing. It explains why we can have this kind of errors, loosing sometimes some codelens. We do that to avoid freezing IJ when the IDE is opening. I think more and more that we should not start language server when IJ is starting, collect all lsp features that must be called for all opened editor like codelens and when IJ is started and indexation is done, we refresh all opened editors. It is not a trivial issue but I think it should avoid having those kind errors and prevent from little freeze. This strategy should be used only for IJ Quarkus which have ls which communicate with IJ to visit Java classes but not for other ls. It is an another sample of LSP API |
Here's a bigger Idea log around the exception. |
Logs from another one (while opening the project): |
Thanks @ksdev-pl for your logs. To fix all those problems, we need to investigate redhat-developer/lsp4ij#498 but it is not a trivial issue. |
@ksdev-pl I have installed IJ 2024.2 and now I have this bug(before this bug didn't exist). I need to find time to try to implement redhat-developer/lsp4ij#498 |
I wonder if this problem is a bug from IJ, I have found a similar issue at https://youtrack.jetbrains.com/issue/IJPL-160478/K1-Constraint-inSmartMode-cannot-be-satisfied-in-org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection-during-scanning |
You cand find another similar issues at https://youtrack.jetbrains.com/issues?q=Constraint%20inSmartMode&u=1 |
@ksdev-pl could you please try to install the fix that I have tried in LSP4IJ, by installing the build zip that you can download at https://github.com/redhat-developer/lsp4ij/actions/runs/10815015873 See https://github.com/redhat-developer/lsp4ij/?tab=readme-ov-file#testing-the-ci-builds for more explanation how to install this zip |
I feel uncomfortable answering, as I stopped using the plugin (I got frustrated (again) when a plugin-related issue appeared in a non-quarkus project). I know you guys are doing the best and it's also frustrating for you, especially with Idea quirks and bugs, etc. Be strong and don't give up 😁 |
Ok thanks @ksdev-pl for your answer, I understand. I'm playing with the build zip and it seems that I have no problem. If you have time, please try it and give me feedback. |
I also got this exception thrown (along with 2 by LSP4IJ). Attaching the full idea.log. Hope this helps. I've also been noticing really sluggish code completion and syntax highlighting lately. Can't really say which version started exhibiting these slowdowns. |
@gasper-vrhovsek I'm working on this issue really annoying issue with redhat-developer/lsp4ij#570 Thanks for your log. You have this problem when you are starting your IJ? |
@angelozerr The exceptions were thrown after several hours of work. Can't say exactly, but it might be the IJ was open for several days. The laggy/sluggish behavior I can notice on a fresh start of IJ. Tried clearing all caches which does not seem to have any impact. Thank you for your effort on this. |
@ksdev-pl @gasper-vrhovsek could you please install:
and tell me if it is working better. The main idea is to start language servers only when all indexing step is finished for all projects. In this case Qute, Quarkus language servers starts and visit Java classes which are ready to collect data. The IJ startup should be a lot improved. Any feedback are welcome! |
@ia3andy please do that also #1373 (comment) and give me feedback. I would like to create a release if there is no problem with this big changes. |
@angelozerr I installed the |
See https://github.com/redhat-developer/lsp4ij?tab=readme-ov-file#testing-nightly-builds |
Hello
The above while opening Quarkus project. I saw it multiple times using nightly build (also while opening project) - I'm reporting as it's also in new stable version (2.0.0).
The text was updated successfully, but these errors were encountered: