Skip to content

LSP "Problems" in VSC/Windows - bad file uri #178

Open
@dgriffie79

Description

@dgriffie79

The "Problems" panel does isn't working on windows, in that clicking on the problem does not take you to the file location because the file URI is messed up as in the screenshot. This causes an annoying window to open up saying the path isn't valid, rather than jumping to the compile error in the code.

lsp

It looks like there are two issues:

  1. the compiler json output is wrong on windows because it doesn't escape the \ in the file path. You can see this by running onyx check --error-format json and the file paths will not have the \\ as they should for json encoded strings.

  2. the uri with the drive letter is encoded weird, so that it looks like 'file://c:/...' which would be an invalid file URI because C: is not a hostname. This commented out call to uri_encode does fix this issue on windows

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions