Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/Workspace/Workspace+Prebuilts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extension Workspace {
public let name: String
public var products: [String]
public var cModules: [String]?
public var includePath: [RelativePath]?
public var includePath: [String]?
public var artifacts: [Artifact]?

public var id: String { name }
Expand All @@ -81,7 +81,7 @@ extension Workspace {
self.name = name
self.products = products
self.cModules = cModules
self.includePath = includePath
self.includePath = includePath?.map({ $0.pathString.replacingOccurrences(of: "\\", with: "/") })
self.artifacts = artifacts
}
}
Expand Down Expand Up @@ -628,7 +628,7 @@ extension Workspace {
path: path,
checkoutPath: checkoutPath,
products: library.products,
includePath: library.includePath,
includePath: try library.includePath?.map({ try RelativePath(validating: $0) }),
cModules: library.cModules ?? []
)
addedPrebuilts.add(managedPrebuilt)
Expand Down
4 changes: 2 additions & 2 deletions Sources/swift-build-prebuilts/BuildPrebuilts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct Artifact: Codable {
var checksum: String
var libraryName: String?
var products: [String]?
var includePath: [RelativePath]?
var includePath: [String]?
var cModules: [String]? // deprecated, includePath is the way forward
var swiftVersion: String?
}
Expand Down Expand Up @@ -222,7 +222,7 @@ struct BuildPrebuilts: AsyncParsableCommand {
checksum: checksum,
libraryName: libraryName,
products: package.products.map(\.name),
includePath: cModules.map({ $0.includeDir.relative(to: repoDir ) }),
includePath: cModules.map({ $0.includeDir.relative(to: repoDir ).pathString.replacingOccurrences(of: "\\", with: "/") }),
swiftVersion: swiftVersion
)

Expand Down