Open xorye opened 4 years ago
vscode-java should ask you to update the project configuration, if build.gradle changed.
@xorye I suspect a problem with evict cache (cache is not evicted when there is an error coming from JDT LS extension side). Perhaps it's a usecase when there is an error on JDT LS extension side?
Could you please test my draft PR https://github.com/redhat-developer/quarkus-ls/pull/227 with your usecase, thanks.
Here is what I did:
Open a new Quarkus Gradle project with no extra extensions added.
Invoke completion to verify that quarkus.datasource.*
completion items don't appear (as expected)
Add the Agroal - Database connection pool
Quarkus extension with the Quarkus: Add extensions to current Quarkus project
command
Press 'now' when this pops up:
Invoke completion.
After invoking completion in step 5. the quarkus.datasource.*
completion items are missing.
@angelozerr I tried the above with your draft PR and had the same issue.
Here is the server trace (it looks fine to me): https://gist.github.com/xorye/df9706b51c3f21a88217dc18af1de0cc
Here is the server trace (it looks fine to me)
No it's not good, you should have a 'microprofile/propertiesChanged'
[Trace - 18:31:10] Sending notification 'microprofile/propertiesChanged'.
Params: {
"type": [
1,
2
],
"projectURIs": [
"C:\\Users\\azerr\\git\\quarkus-ls\\microprofile.jdt\\com.redhat.microprofile.jdt.test\\projects\\gradle\\quarkus-gradle-project"
]
}
I've looked into this problem once more, here is what I've found:
In a clean Quarkus Gradle project, I have added the Agroal extension. In the "Java Dependencies" view, I am missing the Agroal jar, and I am not receiving Agroal completion items in my Java class and in application.properties:
Here are some screenshots from a separate project, outlining what I was missing from the gif above (AKA, what I expected to happen when adding the Agroal extension):
These are the Agroal jars that were missing:
Here are some Agroal completion items that were missing in my resource class:
Here are some Agroal completion items that were missing in my application.properties file:
I've noticed this issue sometimes happens, sometimes doesn't.
Here is the Java Build Status when the issue does not happen:
22f368e4 Synchronizing Gradle build at /home/dakwon/git/redhat-developer-forks/quarkus-gradle-111111 [Done]
d2749ea1 Repository registry initialization [Done]
f9e3d2ec Synchronizing projects [Done]
82e0265f Updating indexes [Done]
8acbe519 Building [Done]
48558b7f Refreshing Maven model [Done]
91292ceb Building [Done]
***NOTE: The following lines happen right after adding the Agroal extension***
77b3752b Building [Done]
cefa6162 Synchronizing Gradle build at /home/dakwon/git/redhat-developer-forks/quarkus-gradle-111111 [Done]
0bddc829 Building [Done]
c7876bf2 Building [Done]
6754681f Building [Done]
84e3c27b Register Watchers [Done]
3e40635f Building [Done]
Here is the Java Build Status when the issue happens:
6a5bd064 Synchronizing projects [Done]
081277d4 Refreshing Maven model [Done]
46df96d7 Synchronizing Gradle build at /home/dakwon/Documents/QuarkusExtTesting/quarkus-gradle-1111111 [Done]
a14b671d Repository registry initialization [Done]
24bc08b7 Updating indexes [Done]
d4310436 Building [Done]
***NOTE: The following line happen right after adding the Agroal extension***
3285e7ab Building [Done]
When the issue does happen, the Synchronizing Gradle build
log is missing.
I can't reproduce this on my machines at the moment. Once I have access to the original machine that I experienced this issue with (tomorrow), I will provide an update and possibly create an issue at https://github.com/eclipse/eclipse.jdt.ls
To reproduce this issue:
Quarkus: Add extensions to current project
commandapplication.properties
, invoke completionquarkus.datasource.driver
)