intellij-quarkus icon indicating copy to clipboard operation
intellij-quarkus copied to clipboard

Improve Quarkus deployment loading for gradle project

Open minatorak opened this issue 1 year ago • 3 comments

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 `

minatorak avatar Dec 30 '23 20:12 minatorak

Could you share your project please.

angelozerr avatar Dec 30 '23 21:12 angelozerr

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

minatorak avatar Jan 03 '24 19:01 minatorak

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.

angelozerr avatar Jan 04 '24 11:01 angelozerr