Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

RLS crashes when passed a non-file URI scheme #421

@Xanewok

Description

@Xanewok

Mostly a tracking issue, here are the two related issues:

This directly occurs at lsp_data:27. Looked at it briefly and it seems that we need to convert urls to Path, since Vfs uses mostly that to deal with it file paths.

Since LSP uses URIs it'd be good to support more schemes or at least not panic right now when handling different ones. I understand that a proper solution would require more thought (e.g. how to deal with fragments, should we only care about scheme + authority + path?) but I think we should at least provide a simple non-crashing fix for now.

@nrc what should be preferred course of action here? Since URIs are guaranteed to be valid by LSP, maybe we could switch VFS' implementation to using URIs (and/or normalize them somehow behorehand) or just fake paths from different URI schemes and feed them as before to the VFS?

This would also probably allow to fix #299.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions