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

'textDocument/publishDiagnostics' failed with message: Illegal argument: line must be non-negative #157

Closed
fbricon opened this issue Oct 9, 2018 · 0 comments
Assignees
Labels
bug Something isn't working to do validation
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Oct 9, 2018

When debugging in vscode, when pasting <?xml version="1.0" encoding="UTF-8"?> into a new empty document, the host vscode instance displays an error:

Notification handler 'textDocument/publishDiagnostics' failed with message: Illegal argument: line must be non-negative

The server sent :

Params: {
    "uri": "file:///Users/fbricon/Dev/xml/foo.xml",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": -2,
                    "character": -2
                },
                "end": {
                    "line": -2,
                    "character": -2
                }
            },
            "severity": 1,
            "code": "PrematureEOF",
            "source": "xml",
            "message": "Premature end of file."
        }
    ]
}
@fbricon fbricon added bug Something isn't working validation labels Oct 9, 2018
@NikolasKomonen NikolasKomonen self-assigned this Oct 9, 2018
@fbricon fbricon added this to the v0.0.3 milestone Nov 3, 2018
@fbricon fbricon added the to do label Nov 15, 2018
@fbricon fbricon modified the milestones: v0.0.3, v0.0.4 Nov 21, 2018
@NikolasKomonen NikolasKomonen modified the milestones: v0.4.0, v0.5.0 Mar 1, 2019
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Mar 18, 2019
Fixes eclipse#157

The most common ocurrences of this error are
when the document is empty or there is just the
xml prolog (<?xml ... ?>). Errors that give negative values
will be ignored for now.

Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Mar 18, 2019
Fixes eclipse#157

The most common ocurrences of this error are
when the document is empty or there is just the
xml prolog (<?xml ... ?>). Errors that give negative values
will be ignored for now.

Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Mar 19, 2019
Fixes eclipse#157

The most common ocurrences of this error are
when the document is empty or there is just the
xml prolog (<?xml ... ?>). Errors that give negative values
will be ignored for now.

Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
fbricon pushed a commit that referenced this issue Mar 19, 2019
Fixes #157

The most common ocurrences of this error are
when the document is empty or there is just the
xml prolog (<?xml ... ?>). Errors that give negative values
will be ignored for now.

Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to do validation
Projects
None yet
Development

No branches or pull requests

2 participants