Change backing storage of DocumentURI to URL

URL can in fact store URIs, it just doesn't have a very nice API to
interact with them. As long as we only operate on absoluteString, we
should be fine though. So instead of implementing the logic for
detecting file URLs ourselves, we can just use a URL as storage for
DocumentURI.
This commit is contained in:
Alex Hoppen
2019-11-19 12:49:39 -08:00
committed by Ben Langmuir
parent aefa1688e4
commit 558d7fc664
26 changed files with 100 additions and 102 deletions

View File

@@ -170,7 +170,7 @@ extension BuildServerBuildSystem: BuildSystem {
}
public func settings(for uri: DocumentURI, _ language: Language) -> FileBuildSettings? {
guard case .url(let url) = uri else {
guard let url = uri.fileURL else {
// We can't determine build settings for non-file URIs.
return nil
}