Skip to content

Commit

Permalink
Remove experimental prefix from Swift SDK command (#7507)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MaxDesiatov authored Apr 26, 2024
1 parent 6a719f4 commit 71a722c
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ let package = Package(
),
.executableTarget(
/** Interacts with Swift SDKs used for cross-compilation */
name: "swift-experimental-sdk",
name: "swift-sdk",
dependencies: ["Commands", "SwiftSDKCommand"],
exclude: ["CMakeLists.txt"]
),
Expand Down
2 changes: 1 addition & 1 deletion Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ add_subdirectory(SPMLLBuild)
add_subdirectory(SPMSQLite3)
add_subdirectory(swift-bootstrap)
add_subdirectory(swift-build)
add_subdirectory(swift-experimental-sdk)
add_subdirectory(swift-sdk)
add_subdirectory(swift-package)
add_subdirectory(swift-run)
add_subdirectory(swift-test)
Expand Down
11 changes: 9 additions & 2 deletions Sources/CoreCommands/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ package struct LocationOptions: ParsableArguments {
package var customCompileDestination: AbsolutePath?

/// Path to the directory containing installed Swift SDKs.
@Option(name: .customLong("experimental-swift-sdks-path"), help: .hidden, completion: .directory)
@Option(
name: .customLong("swift-sdks-path"),
help: "Path to the directory containing installed Swift SDKs",
completion: .directory
)
package var swiftSDKsDirectory: AbsolutePath?

@Option(
Expand Down Expand Up @@ -407,7 +411,10 @@ package struct BuildOptions: ParsableArguments {
package var architectures: [String] = []

/// Filter for selecting a specific Swift SDK to build with.
@Option(name: .customLong("experimental-swift-sdk"), help: .hidden)
@Option(
name: .customLong("swift-sdk"),
help: "Filter for selecting a specific Swift SDK to build with"
)
package var swiftSDKSelector: String?

/// Which compile-time sanitizers should be enabled.
Expand Down
2 changes: 1 addition & 1 deletion Sources/PackageModel/SwiftSDKs/SwiftSDKBundleStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class SwiftSDKBundleStore {
case let .noMatchingSwiftSDK(selector, hostTriple):
return """
No Swift SDK found matching query `\(selector)` and host triple \
`\(hostTriple.tripleString)`. Use `swift experimental-sdk list` command to see \
`\(hostTriple.tripleString)`. Use `swift sdk list` command to see \
available Swift SDKs.
"""
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftSDKCommand/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Swift SDKs Tool
# Swift SDKs Command

This module implements `swift experimental-sdk` command and its subcommands, which allow managing artifact
This module implements `swift sdk` command and its subcommands, which allow managing artifact
bundles used as Swift SDKs, as specified in [SE-0387](/~https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md).
2 changes: 1 addition & 1 deletion Sources/SwiftSDKCommand/SwiftSDKCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Basics

package struct SwiftSDKCommand: AsyncParsableCommand {
package static let configuration = CommandConfiguration(
commandName: "experimental-sdk",
commandName: "sdk",
_superCommandName: "swift",
abstract: "Perform operations on Swift SDKs.",
version: SwiftVersion.current.completeDisplayString,
Expand Down
2 changes: 1 addition & 1 deletion Sources/swift-package-manager/SwiftPM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct SwiftPM {
await SwiftPackageCommand.main()
case "swift-build":
await SwiftBuildCommand.main()
case "swift-experimental-sdk":
case "swift-sdk":
await SwiftSDKCommand.main()
case "swift-test":
await SwiftTestCommand.main()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors

add_executable(swift-experimental-sdk
add_executable(swift-sdk
Entrypoint.swift)
target_link_libraries(swift-experimental-sdk PRIVATE
target_link_libraries(swift-sdk PRIVATE
SwiftSDKCommand)

target_compile_options(swift-experimental-sdk PRIVATE
target_compile_options(swift-sdk PRIVATE
-parse-as-library)

install(TARGETS swift-experimental-sdk
install(TARGETS swift-sdk
RUNTIME DESTINATION bin)
File renamed without changes.
2 changes: 1 addition & 1 deletion Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def install_swiftpm(prefix, args):
# Install the swift-package-manager tool and create symlinks to it.
cli_tool_dest = os.path.join(prefix, "bin")
install_binary(args, "swift-package-manager", os.path.join(cli_tool_dest, "swift-package"), destination_is_directory=False)
for tool in ["swift-build", "swift-test", "swift-run", "swift-package-collection", "swift-package-registry", "swift-experimental-sdk"]:
for tool in ["swift-build", "swift-test", "swift-run", "swift-package-collection", "swift-package-registry", "swift-sdk"]:
src = "swift-package"
dest = os.path.join(cli_tool_dest, tool)
note("Creating tool symlink from %s to %s" % (src, dest))
Expand Down

0 comments on commit 71a722c

Please sign in to comment.