redhat-developer / intellij-quarkus

IntelliJ Quarkus Tools
Eclipse Public License 2.0
114 stars 44 forks source link

Improve Quarkus deploiement loading for gradle project #1302

Open minatorak opened 6 months ago

minatorak commented 6 months ago

Nothing happen for improvements( i'm expect pop-up show available configuration)

Screenshot 2566-12-31 at 03 30 51

i'm also enable [Show the documentation popup] config

Screenshot 2566-12-31 at 03 36 26

and with application.yaml i'm got this error

Screenshot 2566-12-31 at 03 39 12

Here is IDE information

IntelliJ IDEA 2022.3.3 (Community Edition) macOS 14.2.1 Non-Bundled Plugins: Docker (223.8836.46) com.redhat.devtools.intellij.telemetry (1.1.0.52) org.jetbrains.kotlin (223-1.9.10-release-459-IJ8836.35) com.redhat.devtools.intellij.quarkus (1.30.0) ru.adelf.idea.dotenv (2022.3)

and message of error in application.yaml case `Failed to notify classpath resource change

java.lang.RuntimeException: Cannot invoke (class=MicroProfileProjectListener, method=sourceFilesChanged, topic=com.redhat.devtools.intellij.lsp4mp4ij.classpath.ClasspathResourceChangedManager) at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:639) at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:395) at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:374) at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1) at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:433) at jdk.proxy10/jdk.proxy10.$Proxy204.sourceFilesChanged(Unknown Source) at com.redhat.devtools.intellij.lsp4mp4ij.classpath.ClasspathResourceChangedNotifier.notifyChanges(ClasspathResourceChangedNotifier.java:110) at com.redhat.devtools.intellij.lsp4mp4ij.classpath.ClasspathResourceChangedNotifier$1.run(ClasspathResourceChangedNotifier.java:88) at java.base/java.util.TimerThread.mainLoop(Timer.java:566) at java.base/java.util.TimerThread.run(Timer.java:516) Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "sourceMap" is null at com.redhat.devtools.intellij.quarkus.psi.internal.utils.YamlUtils.flattenMap(YamlUtils.java:61) at com.redhat.devtools.intellij.quarkus.psi.internal.utils.YamlUtils.loadYamlAsProperties(YamlUtils.java:46) at com.redhat.devtools.intellij.quarkus.psi.internal.providers.YamlConfigSource.loadConfig(YamlConfigSource.java:43) at com.redhat.devtools.intellij.quarkus.psi.internal.providers.YamlConfigSource.loadConfig(YamlConfigSource.java:34) at com.redhat.devtools.intellij.lsp4mp4ij.psi.core.project.AbstractConfigSource.reload(AbstractConfigSource.java:195) at com.redhat.devtools.intellij.lsp4mp4ij.psi.core.project.PsiMicroProfileProject.lambda$evictConfigSourcesCache$2(PsiMicroProfileProject.java:201) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:898) at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:68) at com.redhat.devtools.intellij.lsp4mp4ij.psi.core.project.PsiMicroProfileProject.evictConfigSourcesCache(PsiMicroProfileProject.java:197) at com.redhat.devtools.intellij.lsp4mp4ij.psi.core.project.PsiMicroProfileProjectManager$MicroProfileProjectListener.sourceFilesChanged(PsiMicroProfileProjectManager.java:65) at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655) at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:621) ... 9 more `

angelozerr commented 6 months ago

Could you share your project please.

minatorak commented 6 months ago

here is project https://github.com/minatorak/learn-code-with-quarkus/tree/config-yaml

Reproduced steps: checkout branch: config-yaml Types any word in file application.yaml error Failed to notify classpath resource change will appear

angelozerr commented 6 months ago

Thanks for sharing your project. For yaml we need to refactor the load of properties but it is not the real problem since application.properties does nothing.

I tested quickly your Gradle project and it seems that load of Quarkus deploimenet doesn't finish the compute.

Try to cancel this process and (in my case) it should work better, but we need to improve performance of quarkus deploimenet for gradle project.