Skip to content

Commit aa13c69

Browse files
committed
Fix test and review feedback
1 parent b2c0c24 commit aa13c69

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Sources/Workspace/Workspace+State.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,15 +427,16 @@ extension WorkspaceStateStorage {
427427

428428
enum Kind: Codable {
429429
case xcframework
430-
case artifactsArchive([String])
430+
case artifactsArchive
431+
case typedArtifactsArchive([String])
431432
case unknown
432433

433434
init(_ underlying: BinaryModule.Kind) {
434435
switch underlying {
435436
case .xcframework:
436437
self = .xcframework
437438
case .artifactsArchive(let types):
438-
self = .artifactsArchive(types.map { $0.rawValue })
439+
self = .typedArtifactsArchive(types.map { $0.rawValue })
439440
case .unknown:
440441
self = .unknown
441442
}
@@ -445,7 +446,11 @@ extension WorkspaceStateStorage {
445446
switch self {
446447
case .xcframework:
447448
return .xcframework
448-
case .artifactsArchive(let types):
449+
case .artifactsArchive:
450+
// For backwards compatiblity reasons we assume an empty types array which in the worst case
451+
// results in a need for a clean build but we won't fail decoding the JSON.
452+
return .artifactsArchive(types: [])
453+
case .typedArtifactsArchive(let types):
449454
return .artifactsArchive(types: types.compactMap { ArtifactsArchiveMetadata.ArtifactType(rawValue: $0) })
450455
case .unknown:
451456
return .unknown

Tests/FunctionalTests/StaticBinaryLibrary.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ struct StaticBinaryLibraryTests {
2323
let (stdout, stderr) = try await executeSwiftRun(
2424
fixturePath.appending("Static").appending("Package1"),
2525
"Example",
26-
extraArgs: ["--experimental-prune-unused-dependencies"]
2726
)
28-
// We expect no warnings to be produced. Specifically no unused dependency warnings.
29-
#expect(!stderr.contains("warning:"))
3027
#expect(stdout == """
3128
42
3229
42

0 commit comments

Comments
 (0)