Closed ahoppen closed 4 months ago
We should throw an error from here instead of crashing sourcekit-lsp by hitting an assertion failure.
https://github.com/apple/sourcekit-lsp/blob/4bff5603b490ac6835e7df69e99c8cfd4846f87a/Sources/LanguageServerProtocol/SupportTypes/DocumentURI.swift#L75
Synced to Apple’s issue tracker as rdar://128036062
Looks like URL can never be created without a scheme, so we shouldn’t be able to hit the assertion and everything is fine.
We should throw an error from here instead of crashing sourcekit-lsp by hitting an assertion failure.
https://github.com/apple/sourcekit-lsp/blob/4bff5603b490ac6835e7df69e99c8cfd4846f87a/Sources/LanguageServerProtocol/SupportTypes/DocumentURI.swift#L75