Skip to content
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

Improve computation of Quarkus/Microprofile properties #159

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Dec 6, 2019

Improve computation of Quarkus/Microprofile properties

Fixes #154

Signed-off-by: azerr azerr@redhat.com

@angelozerr
Copy link
Contributor Author

This PR is a big refactorinh which includes :

  • rename of Quarkus to MicroProfile (projects, classes, packages)
  • provide the propertiesProvider Eclipse extension point to compute the Quarkus properties. There is an implementation of propertiesProvider per annotation (MicroProfile @ConfigProperty, Quarkus @configroot, @ConfigProperties annotations)
  • the ExtendedConfigDescriptionBuildItem was renamed to ItemMetadata (Spring Boot name) and the structure follows the same than Spring Configuration metadata. See https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html

For the moment property value (completion, hover, validation for value) is not implemented (regression). I will work on this issue.

Tests (except test with values) should work.

This PR requires the vscode quarkus PR redhat-developer/vscode-quarkus#171

@angelozerr angelozerr force-pushed the microprofile2 branch 15 times, most recently from fd51640 to 33f6a21 Compare December 9, 2019 14:01
@angelozerr angelozerr marked this pull request as ready for review December 9, 2019 14:01
@xorye
Copy link

xorye commented Dec 9, 2019

After hovering a property in application.properties, I got this in the server trace:

[Trace - 11:48:32 a.m.] Sending request 'textDocument/hover - (8)'.
Dec 09, 2019 11:48:32 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.ClassCastException: com.redhat.microprofile.model.Assign cannot be cast to com.redhat.microprofile.model.PropertyValue
java.util.concurrent.CompletionException: java.lang.ClassCastException: com.redhat.microprofile.model.Assign cannot be cast to com.redhat.microprofile.model.PropertyValue
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1121)
	at java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1084)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:457)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

It only happened once and I'm having a very hard time reproducing this error.

@angelozerr angelozerr force-pushed the microprofile2 branch 2 times, most recently from 04d42f2 to 34eb204 Compare December 10, 2019 15:16
@angelozerr angelozerr changed the title Improve compute of Quarkus/Microprofile properties Improve computation of Quarkus/Microprofile properties Dec 10, 2019
@angelozerr angelozerr force-pushed the microprofile2 branch 2 times, most recently from 9748d01 to fc838dd Compare December 10, 2019 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve computation of Quarkus/MicroProfile properties
2 participants