Skip to content

Rename the SwiftPM entry point. #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Sources/Testing/Running/EntryPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ private import TestingInternals
///
/// - Warning: This function is used by Swift Package Manager. Do not call it
/// directly.
@_spi(SwiftPackageManagerSupport)
@_disfavoredOverload
public func swiftPMEntryPoint() async -> CInt {
@_disfavoredOverload public func __swiftPMEntryPoint() async -> CInt {
@Locked var exitCode = EXIT_SUCCESS

do {
Expand Down Expand Up @@ -68,10 +66,21 @@ public func swiftPMEntryPoint() async -> CInt {
///
/// - Warning: This function is used by Swift Package Manager. Do not call it
/// directly.
public func __swiftPMEntryPoint() async -> Never {
let exitCode: CInt = await __swiftPMEntryPoint()
exit(exitCode)
}

/// Call `__swiftPMEntryPoint()`.
///
/// This function is an old alias of `__swiftPMEntryPoint()`. It will be removed
/// in the near future.
///
/// - Warning: This function is used by Swift Package Manager. Do not call it
/// directly.
@_spi(SwiftPackageManagerSupport)
public func swiftPMEntryPoint() async -> Never {
let exitCode: CInt = await swiftPMEntryPoint()
exit(exitCode)
await __swiftPMEntryPoint()
}

// MARK: -
Expand Down