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

In qute, allow spaces between method parameters and only validate the return type of the method invocation when iterating over a method invocation #966

Closed
gbourant opened this issue Jul 9, 2024 · 10 comments · Fixed by #967
Assignees
Labels
bug Something isn't working qute
Milestone

Comments

@gbourant
Copy link

gbourant commented Jul 9, 2024

The following image is the file angelozerr.html. As you can see, based on the formatting it highlights that the code has some errors.

image

To remove the error highlight i did the following, i changed

ifElementHasError(errorFields, errorKeys)} with
ifElementHasError(errorFields,errorKeys) }, I removed the space after the comma and added a space before the last curly bracket.

getErrorMessages(errorFields,errorKeys)} with
getErrorMessages(errorFields, errorKeys)} (added a space after the command and added a space before the last curly bracket)

After you fix those two errors you get a new one as shown in the image. So i changed {errorMessage} to { errorMessage} (added a space after the first curly bracket)

image

Reproducer: https://github.com/gbourant/qute-bugs

@fbricon
Copy link
Collaborator

fbricon commented Jul 9, 2024

Need to check but it might be fixed by #965

@fbricon
Copy link
Collaborator

fbricon commented Jul 9, 2024

@angelozerr #965 does NOT fix this bug

@angelozerr
Copy link
Contributor

@gbourant let me invesitigate your problem.

If you write { errorMessage} it should be not a valid Qute expression (but perhaps the Qute parser is supporting that now?)

@gbourant
Copy link
Author

gbourant commented Jul 9, 2024

@gbourant let me invesitigate your problem.

If you write { errorMessage} it should be not a valid Qute expression (but perhaps the Qute parser is supporting that now?)

Correct, i tried { errorMessage} and it does not work.

@mkouba, shouldn't we get a compile time error for this?
image

@angelozerr
Copy link
Contributor

See doc at https://quarkus.pro/guides/qute-reference.html#identifiers

@angelozerr
Copy link
Contributor

angelozerr commented Jul 9, 2024

@gbourant another question is the following expression (parameter with space)

getErrorMessages(errorFields, errorKeys)

is working?

I ask you that because in our Qute support, you should see the type if verythinh is working good:

image

If you add an extra space we consider that it is not valid and the type is not displayed:

image

and it is the reason whyyour {errorMessage} is highlighted as an error since the type cannot be resolved.

@angelozerr
Copy link
Contributor

We have a bug with validationerror of iterable:

image

This validation must not be applied for parameter.

@gbourant
Copy link
Author

gbourant commented Jul 9, 2024

@gbourant another question is the following expression (parameter with space)

getErrorMessages(errorFields, errorKeys)

is working?

Yes it's working.

angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 9, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 9, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 9, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr self-assigned this Jul 9, 2024
@angelozerr angelozerr added bug Something isn't working qute labels Jul 9, 2024
@angelozerr angelozerr added this to the 0.19.0 milestone Jul 9, 2024
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 9, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 10, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr moved this to 👀 In review in IDE Cloudaptors Jul 10, 2024
@mkouba
Copy link
Collaborator

mkouba commented Jul 10, 2024

@angelozerr
Copy link
Contributor

@gbourant I have fixed your problem in #967

angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 10, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Jul 10, 2024
Fixes redhat-developer#966

Signed-off-by: azerr <azerr@redhat.com>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDE Cloudaptors Jul 10, 2024
@angelozerr angelozerr changed the title Qute highlight errors due to formatting In qute, allow spaces between method parameters and only validate the return type of the method invocation when iterating over a method invocation Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qute
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants