Skip to content

Commit 65d55cf

Browse files
MaxDesiatovfurby-tm
authored andcommitted
Make SwiftSDK.init available via @_spi (swiftlang#7482)
This initializer is an internal implementation detail that should only be available via `@_spi`.
1 parent f023ae0 commit 65d55cf

File tree

6 files changed

+24
-8
lines changed

6 files changed

+24
-8
lines changed

Sources/Commands/SwiftTestCommand.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2015-2022 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2015-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -19,6 +19,8 @@ import CoreCommands
1919
import Dispatch
2020
import Foundation
2121
import PackageGraph
22+
23+
@_spi(SwiftPMInternal)
2224
import PackageModel
2325

2426
import SPMBuildCore

Sources/PackageModel/SwiftSDKs/SwiftSDK.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2021 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -156,7 +156,8 @@ public struct SwiftSDK: Equatable {
156156
}
157157

158158
/// Whether or not the receiver supports testing using XCTest.
159-
package enum XCTestSupport: Sendable, Equatable {
159+
@_spi(SwiftPMInternal)
160+
public enum XCTestSupport: Sendable, Equatable {
160161
/// XCTest is supported.
161162
case supported
162163

@@ -465,7 +466,8 @@ public struct SwiftSDK: Equatable {
465466
}
466467

467468
/// Creates a Swift SDK with the specified properties.
468-
package init(
469+
@_spi(SwiftPMInternal)
470+
public init(
469471
hostTriple: Triple? = nil,
470472
targetTriple: Triple? = nil,
471473
toolset: Toolset,

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import DriverSupport
2020
@testable import PackageGraph
2121

2222
import PackageLoading
23+
24+
@_spi(SwiftPMInternal)
2325
@testable import PackageModel
26+
2427
import SPMBuildCore
2528
import SPMTestSupport
2629
import SwiftDriver

Tests/PackageModelTests/PackageModelTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2021 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -11,7 +11,10 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import Basics
14+
15+
@_spi(SwiftPMInternal)
1416
@testable import PackageModel
17+
1518
import func TSCBasic.withTemporaryFile
1619
import XCTest
1720

Tests/PackageModelTests/SwiftSDKTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2014-2022 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -11,7 +11,10 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
@testable import Basics
14+
15+
@_spi(SwiftPMInternal)
1416
@testable import PackageModel
17+
1518
@testable import SPMBuildCore
1619
import XCTest
1720

Tests/SPMBuildCoreTests/PluginInvocationTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift open source project
44
//
5-
// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See http://swift.org/LICENSE.txt for license information
@@ -16,7 +16,10 @@ import Basics
1616
@testable import PackageGraph
1717

1818
import PackageLoading
19+
20+
@_spi(SwiftPMInternal)
1921
import PackageModel
22+
2023
@testable import SPMBuildCore
2124
import SPMTestSupport
2225
import Workspace
@@ -26,7 +29,7 @@ import class TSCBasic.InMemoryFileSystem
2629

2730
import struct TSCUtility.SerializedDiagnostics
2831

29-
class PluginInvocationTests: XCTestCase {
32+
final class PluginInvocationTests: XCTestCase {
3033

3134
func testBasics() throws {
3235
// Construct a canned file system and package graph with a single package and a library that uses a build tool plugin that invokes a tool.

0 commit comments

Comments
 (0)