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

Support for Evaluation of CompletionStage and Uni Objects #826

Closed
gastaldi opened this issue Mar 24, 2023 · 6 comments · Fixed by #832
Closed

Support for Evaluation of CompletionStage and Uni Objects #826

gastaldi opened this issue Mar 24, 2023 · 6 comments · Fixed by #832
Assignees
Labels
bug Something isn't working qute validation
Milestone

Comments

@gastaldi
Copy link

gastaldi commented Mar 24, 2023

Describe the bug

When adding a CompletableFuture data item to a qute template, eclipse shows an error:

For example: I am adding a CompletableFuture here:
Screenshot 2023-03-24 at 09 16 25

In eclipse Qute editor, I see this error :

Screenshot 2023-03-24 at 09 18 07

If I complete the future in the java code:
Screenshot 2023-03-24 at 09 18 59

The warning goes away, though the code is no longer reactive....
Screenshot 2023-03-24 at 09 19 50

Expected behavior

Use of completablefuture should work the same as just passing data objects.

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8) OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

eclipse

Additional information

Doesn't actually prevent anything from working as it should. Just an annoying eclipse error.

Using eclipse plugin "Quarkus Tools 4.26.0.Final'

Reported by @TonyWeston in quarkusio/quarkus#32103

@jeffmaury
Copy link
Member

jeffmaury commented Mar 24, 2023

Adding @angelozerr

@fbricon fbricon added bug Something isn't working validation qute labels Mar 24, 2023
@fbricon
Copy link
Collaborator

fbricon commented Mar 24, 2023

@TonyWeston can you provide a small sample project reproducing this issue please?

@angelozerr
Copy link
Contributor

@angelozerr
Copy link
Contributor

@mkouba in the sample https://quarkus.io/guides/qute-reference#evaluation-of-completionstage-and-uni-objects you speak about object part which can be a CompletionStage, but is it possible to use property or method part with CompletionStage?

@mkouba
Copy link
Collaborator

mkouba commented Mar 25, 2023

@mkouba in the sample https://quarkus.io/guides/qute-reference#evaluation-of-completionstage-and-uni-objects you speak about object part which can be a CompletionStage, but is it possible to use property or method part with CompletionStage?

Yes. This sentence is crucial: "If a part of an expression resolves to a CompletionStage, the resolution continues once this stage is completed and the next part of the expression (if any) is evaluated against the result of the completed stage."

@angelozerr angelozerr changed the title Qute Eclipse plugin error when using CompletableFutures Support for Evaluation of CompletionStage and Uni Objects Mar 27, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 27, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 27, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 27, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 27, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 28, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 29, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 29, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 29, 2023
@angelozerr angelozerr added this to the 0.14.0 milestone Mar 29, 2023
@angelozerr angelozerr self-assigned this Mar 29, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 30, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 30, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 30, 2023
@angelozerr
Copy link
Contributor

angelozerr commented Mar 30, 2023

Yes. This sentence is crucial: "If a part of an expression resolves to a CompletionStage, the resolution continues once this stage is completed and the next part of the expression (if any) is evaluated against the result of the completed stage."

Ooops sorry I have not seen that. Thanks for your answer, I covered this usecase too.

angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 30, 2023
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment