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 error message to show in the first line an understandable error message #1145

Closed
WolfgangHG opened this issue Jan 2, 2022 · 10 comments · Fixed by #1271
Closed

Improve error message to show in the first line an understandable error message #1145

WolfgangHG opened this issue Jan 2, 2022 · 10 comments · Fixed by #1271
Assignees
Labels
enhancement New feature or request validation
Milestone

Comments

@WolfgangHG
Copy link

This is from Eclipse 2021-12 (4.22): this xml snippet causes two validation errors:

<application xmlns="https://jakarta.ee/xml/ns/jakartaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/application_9.xsd">
	<invalid>
	</invalid>
</application>

The "Language Servers" section shows only the headers of the error message, in my sample "Attribute:" and "Invalid element name".
Markers View
The other two errors seem to result from the WTP XML validator.

Copying the details shows the full error:

Attribute:
 - version
is required in element:
 - application

And:

Invalid element name:
 - invalid

One of the following is expected:
 - application-name
 - description
 - display-name
 - icon
 - initialize-in-order
 - module

So, the "Markers" views should either remove the newlines or display multiline texts.

Hope this is the right place to report this issue.

@mickaelistria mickaelistria transferred this issue from eclipse-wildwebdeveloper/wildwebdeveloper Jan 2, 2022
@angelozerr
Copy link
Contributor

I close this issue since its à lsp client issue with eclipse ide and i suppose lsp4e. See https://github.com/eclipse/wildwebdeveloper/issues/761

@WolfgangHG
Copy link
Author

@angelozerr This issue was originally https://github.com/eclipse/wildwebdeveloper/issues/761 and then moved to this project. So #761 is now closed, too. Could you reopen and move this issue to the new project?

@angelozerr
Copy link
Contributor

angelozerr commented Jan 3, 2022

Oh I see. @mickaelistria this issue is for lsp4e or perhaps eclipse ui marker. The problem here is that diagnostic display a readable message with line sperator and marker view shows only the first line. This problem is not linked to lemminx but to marker view.

@mickaelistria
Copy link
Contributor

Could the diagnoatic be enhanced to have a more explicit 1st line then? Multiple lines can be too intrusive eg also for cases of inline diagnostics. 1st line should be a summary of the issue and not 1st line of details.

@angelozerr angelozerr reopened this Jan 3, 2022
@angelozerr
Copy link
Contributor

We manage this diagnostic kind to have readable error message:

image

I don't know if we could add more content in the first line to keep this readable message.

@mickaelistria
Copy link
Contributor

A summary could be Element "invalid" is invalid here according to schema and then next lines can provide details.

@angelozerr
Copy link
Contributor

@fbricon what do you think about that?

@fbricon
Copy link
Contributor

fbricon commented Jan 31, 2022

+1

@fbricon fbricon added enhancement New feature or request validation labels Aug 9, 2022
@angelozerr
Copy link
Contributor

angelozerr commented Aug 10, 2022

@JessicaJHee are you interested in working on this issue?

@JessicaJHee
Copy link
Contributor

I'm interested!

@datho7561 datho7561 added this to the 0.22.0 milestone Aug 15, 2022
@angelozerr angelozerr changed the title XML validation errors of "Language Servers" are only partially visible Improve error message to show in the first line an understandable error message Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request validation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants