From 4896cc6fe74e671b731871e33c6ff7dcf8596a35 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 4 Sep 2022 10:58:18 -0700 Subject: [PATCH] SKCore: use `resolvingSymlinks` to resolve symlinks Rather than using the `resolvingSymlinksInPath` on `URL` use `resolvingSymlink` from tools-support-core as the semantics for the two differ ever so slightly which matters for Windows (the former expands symlinks on the terminal arc iterative where as the latter simply expands the path). --- Sources/SKCore/CompilationDatabase.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SKCore/CompilationDatabase.swift b/Sources/SKCore/CompilationDatabase.swift index ac2c0a07..2aec18e5 100644 --- a/Sources/SKCore/CompilationDatabase.swift +++ b/Sources/SKCore/CompilationDatabase.swift @@ -162,7 +162,7 @@ public struct JSONCompilationDatabase: CompilationDatabase, Equatable { let url = command.url pathToCommands[url, default: []].append(commands.count) - let canonical = url.resolvingSymlinksInPath() + let canonical = URL(fileURLWithPath: resolveSymlinks(AbsolutePath(url.path)).pathString) if canonical != url { pathToCommands[canonical, default: []].append(commands.count) }