Adopt to path API changes

We are moving to a better model for TSC's path APIs in apple/swift-tools-support-core#353. The previous API is still available (but deprecated) as much as possible, but since SourceKit-LSP was using `resolveSymlinks` (which is now throwing) quite a bit, there are some changes necessary.
This commit is contained in:
Boris Buegling
2022-10-18 15:28:54 -07:00
parent 9597081d36
commit 43c072dc84
10 changed files with 81 additions and 80 deletions

View File

@@ -275,8 +275,7 @@ extension BuildServerBuildSystem: BuildSystem {
return .handled
}
let realpath = resolveSymlinks(path)
if realpath != path, projectRoot.isAncestorOfOrEqual(to: realpath) {
if let realpath = try? resolveSymlinks(path), realpath != path, projectRoot.isAncestorOfOrEqual(to: realpath) {
return .handled
}