File tree 2 files changed +14
-11
lines changed 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -427,15 +427,16 @@ extension WorkspaceStateStorage {
427
427
428
428
enum Kind : Codable {
429
429
case xcframework
430
- case artifactsArchive( [ String ] )
430
+ case artifactsArchive
431
+ case typedArtifactsArchive( [ String ] )
431
432
case unknown
432
433
433
434
init ( _ underlying: BinaryModule . Kind ) {
434
435
switch underlying {
435
436
case . xcframework:
436
437
self = . xcframework
437
438
case . artifactsArchive( let types) :
438
- self = . artifactsArchive ( types. map { $0. rawValue } )
439
+ self = . typedArtifactsArchive ( types. map { $0. rawValue } )
439
440
case . unknown:
440
441
self = . unknown
441
442
}
@@ -445,7 +446,11 @@ extension WorkspaceStateStorage {
445
446
switch self {
446
447
case . xcframework:
447
448
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) :
449
454
return . artifactsArchive( types: types. compactMap { ArtifactsArchiveMetadata . ArtifactType ( rawValue: $0) } )
450
455
case . unknown:
451
456
return . unknown
Original file line number Diff line number Diff line change 12
12
import DriverSupport
13
13
import PackageModel
14
14
import TSCBasic
15
- import Testing
15
+ import XCTest
16
16
import _InternalTestSupport
17
17
18
- @ Suite
19
- struct StaticBinaryLibraryTests {
20
- @ Test
21
- func staticLibrary ( ) async throws {
18
+ final class StaticBinaryLibraryTests : XCTestCase {
19
+ func testStaticLibrary ( ) async throws {
20
+ try XCTSkipOnWindows ( because : " https://github.com/swiftlang/swift-package-manager/issues/8657 " )
21
+
22
22
try await fixture ( name: " BinaryLibraries " ) { fixturePath in
23
23
let ( stdout, stderr) = try await executeSwiftRun (
24
24
fixturePath. appending ( " Static " ) . appending ( " Package1 " ) ,
25
25
" Example " ,
26
26
extraArgs: [ " --experimental-prune-unused-dependencies " ]
27
27
)
28
- // We expect no warnings to be produced. Specifically no unused dependency warnings.
29
- #expect( !stderr. contains ( " warning: " ) )
30
- #expect( stdout == """
28
+ XCTAssertEqual ( stdout, """
31
29
42
32
30
42
33
31
You can’t perform that action at this time.
0 commit comments