Skip to content

Commit 71a722c

Browse files
authored
Remove experimental prefix from Swift SDK command (#7507)
Since [SE-0387](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md) was accepted and available in Swift 5.9 and Swift 5.10, it's time to remove `experimental` prefix.
1 parent 6a719f4 commit 71a722c

File tree

10 files changed

+21
-14
lines changed

10 files changed

+21
-14
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ let package = Package(
529529
),
530530
.executableTarget(
531531
/** Interacts with Swift SDKs used for cross-compilation */
532-
name: "swift-experimental-sdk",
532+
name: "swift-sdk",
533533
dependencies: ["Commands", "SwiftSDKCommand"],
534534
exclude: ["CMakeLists.txt"]
535535
),

Sources/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ add_subdirectory(SPMLLBuild)
3232
add_subdirectory(SPMSQLite3)
3333
add_subdirectory(swift-bootstrap)
3434
add_subdirectory(swift-build)
35-
add_subdirectory(swift-experimental-sdk)
35+
add_subdirectory(swift-sdk)
3636
add_subdirectory(swift-package)
3737
add_subdirectory(swift-run)
3838
add_subdirectory(swift-test)

Sources/CoreCommands/Options.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ package struct LocationOptions: ParsableArguments {
112112
package var customCompileDestination: AbsolutePath?
113113

114114
/// Path to the directory containing installed Swift SDKs.
115-
@Option(name: .customLong("experimental-swift-sdks-path"), help: .hidden, completion: .directory)
115+
@Option(
116+
name: .customLong("swift-sdks-path"),
117+
help: "Path to the directory containing installed Swift SDKs",
118+
completion: .directory
119+
)
116120
package var swiftSDKsDirectory: AbsolutePath?
117121

118122
@Option(
@@ -407,7 +411,10 @@ package struct BuildOptions: ParsableArguments {
407411
package var architectures: [String] = []
408412

409413
/// Filter for selecting a specific Swift SDK to build with.
410-
@Option(name: .customLong("experimental-swift-sdk"), help: .hidden)
414+
@Option(
415+
name: .customLong("swift-sdk"),
416+
help: "Filter for selecting a specific Swift SDK to build with"
417+
)
411418
package var swiftSDKSelector: String?
412419

413420
/// Which compile-time sanitizers should be enabled.

Sources/PackageModel/SwiftSDKs/SwiftSDKBundleStore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public final class SwiftSDKBundleStore {
4646
case let .noMatchingSwiftSDK(selector, hostTriple):
4747
return """
4848
No Swift SDK found matching query `\(selector)` and host triple \
49-
`\(hostTriple.tripleString)`. Use `swift experimental-sdk list` command to see \
49+
`\(hostTriple.tripleString)`. Use `swift sdk list` command to see \
5050
available Swift SDKs.
5151
"""
5252
}

Sources/SwiftSDKCommand/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Swift SDKs Tool
1+
# Swift SDKs Command
22

3-
This module implements `swift experimental-sdk` command and its subcommands, which allow managing artifact
3+
This module implements `swift sdk` command and its subcommands, which allow managing artifact
44
bundles used as Swift SDKs, as specified in [SE-0387](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md).

Sources/SwiftSDKCommand/SwiftSDKCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Basics
1515

1616
package struct SwiftSDKCommand: AsyncParsableCommand {
1717
package static let configuration = CommandConfiguration(
18-
commandName: "experimental-sdk",
18+
commandName: "sdk",
1919
_superCommandName: "swift",
2020
abstract: "Perform operations on Swift SDKs.",
2121
version: SwiftVersion.current.completeDisplayString,

Sources/swift-package-manager/SwiftPM.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct SwiftPM {
4141
await SwiftPackageCommand.main()
4242
case "swift-build":
4343
await SwiftBuildCommand.main()
44-
case "swift-experimental-sdk":
44+
case "swift-sdk":
4545
await SwiftSDKCommand.main()
4646
case "swift-test":
4747
await SwiftTestCommand.main()

Sources/swift-experimental-sdk/CMakeLists.txt renamed to Sources/swift-sdk/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# See http://swift.org/LICENSE.txt for license information
77
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
88

9-
add_executable(swift-experimental-sdk
9+
add_executable(swift-sdk
1010
Entrypoint.swift)
11-
target_link_libraries(swift-experimental-sdk PRIVATE
11+
target_link_libraries(swift-sdk PRIVATE
1212
SwiftSDKCommand)
1313

14-
target_compile_options(swift-experimental-sdk PRIVATE
14+
target_compile_options(swift-sdk PRIVATE
1515
-parse-as-library)
1616

17-
install(TARGETS swift-experimental-sdk
17+
install(TARGETS swift-sdk
1818
RUNTIME DESTINATION bin)

Utilities/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def install_swiftpm(prefix, args):
435435
# Install the swift-package-manager tool and create symlinks to it.
436436
cli_tool_dest = os.path.join(prefix, "bin")
437437
install_binary(args, "swift-package-manager", os.path.join(cli_tool_dest, "swift-package"), destination_is_directory=False)
438-
for tool in ["swift-build", "swift-test", "swift-run", "swift-package-collection", "swift-package-registry", "swift-experimental-sdk"]:
438+
for tool in ["swift-build", "swift-test", "swift-run", "swift-package-collection", "swift-package-registry", "swift-sdk"]:
439439
src = "swift-package"
440440
dest = os.path.join(cli_tool_dest, tool)
441441
note("Creating tool symlink from %s to %s" % (src, dest))

0 commit comments

Comments
 (0)