x/tools/internal/span: URI.IsFile() should support file:/absolute/path URIs #49501
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls v0.7.3 with Eclipse LSP4e 0.13.8 is breaking as LSP4e sends local file URIs with a single
/
(protocol trace below). This causes internal/span.URI.IsFile() to reject the URI as afile:
URI:and leads to gopls rejecting the workspace folder:
The
file:
scheme an absolute path is a permitted value under RFC8089 (The "file" URI Scheme) as thefile-hier-part
can be alocal-path
, which in turn is anpath-absolute
path-absolute
is referenced from RFC3986:Although the protocol trace shows Eclipse LSP4e is inconsistently using both
file:///
andfile:/
URIs, gopls should not reject permitted values.And indeed Go's
net/url.Parse()
has tests to ensure support offile:/
URIs.pretty-printed protocol trace
(
ca.mt.gore.server
is a simple Eclipse plugin to install and configuregopls
for Eclipse.)The text was updated successfully, but these errors were encountered: