-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use tsc_await rather than await #3037
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
Conversation
@swift-ci please test |
This will also need to update the vendored copy of TSC in swift-tools-support-core |
There are probably some new uses of |
@swift-ci smoke test |
Yes, I did it in swiftlang/swift-tools-support-core#164 |
The failure is addressed by #3038 which will be merged as soon as tests finish. It was the result of two PRs that each passed independently but failed when both merged. |
@swift-ci please smoke test |
@@ -2320,7 +2320,7 @@ extension Workspace { | |||
// way to get it back out of the resolver which is very | |||
// annoying. Maybe we should make an SPI on the provider for | |||
// this? | |||
let container = try await { containerProvider.getContainer(for: package, skipUpdate: true, completion: $0) } as! RepositoryPackageContainer | |||
let container = try tsc_await { containerProvider.getContainer(for: package, skipUpdate: true, completion: $0) } as! RepositoryPackageContainer | |||
guard let tag = container.getTag(for: version) else { | |||
throw StringError("Internal error: please file a bug at https://bugs.swift.org with this info -- unable to get tag for \(package) \(version); available versions \(container.reversedVersions)") | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abertelrud @neonichu beyond the scope of this PR, but the fact the code [in the above three files] is blocking on what looks to be I/O seems like its worth a deeper look. at a high-level, "asynchronity" should bubble all the way to the "top" and only the UI/CLI call sites should block or use a dispatch queue to synchronize the "effects" where appropriate. Usage in tests is fine to simplify.
This is the follow-on to #3036, adopting the new swift-tools-support-core and using
tsc_await
in lieu ofawait
.