Skip to content

Commit 033306c

Browse files
committed
Fix test failure
1 parent 867f717 commit 033306c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Sources/ScipioKit/Resolver/ModuleTypeResolver.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ extension PackageResolver {
6969
FileManager.default
7070
.enumerator(at: source, includingPropertiesForKeys: nil)?
7171
.lazy
72-
.compactMap { ($0 as? URL)?.standardizedFileURL }
72+
.compactMap { $0 as? URL }
7373
.filter { url in
7474
moduleExcludeFullPaths.allSatisfy { !url.path.hasPrefix($0.path) }
7575
} ?? []
@@ -89,7 +89,11 @@ extension PackageResolver {
8989
} else {
9090
.clang(
9191
includeDir: includeDir,
92-
publicHeaders: sources.filter { headerExtensions.contains($0.pathExtension) }
92+
publicHeaders: FileManager.default
93+
.enumerator(at: includeDir, includingPropertiesForKeys: nil)?
94+
.compactMap { $0 as? URL }
95+
.filter { headerExtensions.contains($0.pathExtension) }
96+
?? []
9397
)
9498
}
9599
}

Tests/ScipioKitTests/RunnerTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ final class RunnerTests: XCTestCase {
270270
}
271271

272272
func testBuildClangPackageWithCustomModulePath() async throws {
273+
defer {
274+
try? fileManager.removeItem(at: clangPackageWithCustomModulePath.appending(component: ".build"))
275+
}
276+
273277
let runner = Runner(
274278
mode: .createPackage,
275279
options: .init(

0 commit comments

Comments
 (0)