diff --git a/Sources/PackageLoading/ManifestLoader.swift b/Sources/PackageLoading/ManifestLoader.swift index 479e58107d1..295ac695272 100644 --- a/Sources/PackageLoading/ManifestLoader.swift +++ b/Sources/PackageLoading/ManifestLoader.swift @@ -512,10 +512,17 @@ public final class ManifestLoader: ManifestLoaderProtocol { let manifestTempFilePath = tempDir.appending(component: "manifest.swift") try localFileSystem.writeFileContents(manifestTempFilePath, bytes: ByteString(manifestPreamble.contents + manifestContents)) + #if os(Windows) + // On Windows, we seem to have issues with the VFS overlay, so let's disable it for now. + let effectiveManifestPath = manifestTempFilePath + let vfsOverlayTempFilePath: AbsolutePath? = nil + #else + let effectiveManifestPath = manifestPath let vfsOverlayTempFilePath = tempDir.appending(component: "vfs.yaml") try VFSOverlay(roots: [ VFSOverlay.File(name: manifestPath.pathString, externalContents: manifestTempFilePath.pathString) ]).write(to: vfsOverlayTempFilePath, fileSystem: localFileSystem) + #endif validateImports(manifestPath: manifestTempFilePath, toolsVersion: toolsVersion, callbackQueue: callbackQueue) { result in dispatchPrecondition(condition: .onQueue(callbackQueue)) @@ -524,7 +531,7 @@ public final class ManifestLoader: ManifestLoaderProtocol { try result.get() try self.evaluateManifest( - at: manifestPath, + at: effectiveManifestPath, vfsOverlayPath: vfsOverlayTempFilePath, packageIdentity: packageIdentity, toolsVersion: toolsVersion, diff --git a/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift b/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift index a54268bc743..d65ed94b289 100644 --- a/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift +++ b/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift @@ -215,6 +215,10 @@ class PackageDescription5_6LoadingTests: PackageDescriptionLoadingTests { /// Tests access to the package's directory contents. func testPackageContextDirectory() throws { + #if os(Windows) + throw XCTSkip("Skipping since this tests does not fully work without the VFS overlay which is currently disabled on Windows") + #endif + let content = """ import PackageDescription import Foundation