-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Use of AsyncParsableCommand
triggers TBD validation failure
#64900
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
Comments
Haven't fully reduced this yet, but something like this is along the liens of what is triggering this: // RUN: %target-swift-frontend -I ... -module-name reduced -parse-as-library -c %s -S -emit-ir -o -
import ArgumentParser
protocol DestinationCommand: AsyncParsableCommand { }
extension DestinationCommand {
public func run() async throws { }
}
public struct ListDestinations: DestinationCommand {
public init() {}
} |
Reduced: P.swift // RUN: %target-swift-frontend -parse-as-library -emit-module -module-name P -emit-module-path %t\P.swiftmodule %s
public protocol P {
func f() async throws
} Q.swift // RUN: %target-swift-frontend -I%t -parse-as-library -module-name reduced -S -emit-ir -o - %s
import P
protocol Q: P {}
extension Q {
public func f() async throws { }
}
public struct S: Q {
public init() { }
} (thanks to help from @aschwaighofer) |
Resolving this will likely lead to the removal of the workaround at https://github.com/apple/swift/blob/main/include/swift/SIL/SILLinkage.h#L290-L304
CC: @slavapestov - 6a83e73 |
Removing the workaround causes a SIL verification failure:
|
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900).
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900). Thanks to @dgregor and @aschwaighofer for the discussion on this!
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900). Thanks to @dgregor and @aschwaighofer for the discussion on this!
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900). Thanks to @DougGregor and @aschwaighofer for the discussion on this!
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900). Thanks to @DougGregor and @aschwaighofer for the discussion on this!
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900). Thanks to @DougGregor and @aschwaighofer for the discussion on this!
When a protocol witness thunk is formed to a serialised protocol containing an `async` function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit). This was identified by swift-package-manager (swiftlang#64900). Thanks to @DougGregor and @aschwaighofer for the discussion on this!
Uh oh!
There was an error while loading. Please reload this page.
Originally posted by @compnerd in swiftlang/swift-package-manager#6361 (comment)
The text was updated successfully, but these errors were encountered: