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
21 changes: 14 additions & 7 deletions Sources/Workspace/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1161,18 +1161,25 @@ extension Workspace {
if let path = target.path {
let artifactPath = try manifest.path.parentDirectory
.appending(RelativePath(validating: path))
guard let (_, artifactKind) = try BinaryArtifactsManager.deriveBinaryArtifact(
if artifactPath.extension?.lowercased() == "zip" {
partial[target.name] = BinaryArtifact(
kind: .unknown,
originURL: .none,
path: artifactPath
)
} else if let (_, artifactKind) = try BinaryArtifactsManager.deriveBinaryArtifact(
fileSystem: self.fileSystem,
path: artifactPath,
observabilityScope: observabilityScope
) else {
) {
partial[target.name] = BinaryArtifact(
kind: artifactKind,
originURL: .none,
path: artifactPath
)
} else {
throw StringError("\(artifactPath) does not contain binary artifact")
}
partial[target.name] = BinaryArtifact(
kind: artifactKind,
originURL: .none,
path: artifactPath
)
} else if let url = target.url.flatMap(URL.init(string:)) {
let fakePath = try manifest.path.parentDirectory.appending(components: "remote", "archive")
.appending(RelativePath(validating: url.lastPathComponent))
Expand Down
5 changes: 5 additions & 0 deletions Tests/WorkspaceTests/WorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9231,6 +9231,11 @@ final class WorkspaceTests: XCTestCase {
url: "https://a.com/a2.zip.zip",
checksum: "a3"
),
MockTarget(
name: "A4",
type: .binary,
path: "a4.zip"
),
],
products: []
),
Expand Down