Skip to content

[Concurrency] Deprecate typealias PartialAsyncTask #38042

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
Jun 23, 2021
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions stdlib/public/Concurrency/PartialAsyncTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -13,10 +13,6 @@
import Swift
@_implementationOnly import _SwiftConcurrencyShims

/// TODO: remove this before shipping
@available(SwiftStdlib 5.5, *)
public typealias PartialAsyncTask = UnownedJob

/// A job is a unit of scheduleable work.
@available(SwiftStdlib 5.5, *)
@frozen
Expand Down
6 changes: 5 additions & 1 deletion stdlib/public/Concurrency/SourceCompatibilityShims.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down Expand Up @@ -255,3 +255,7 @@ extension ThrowingTaskGroup {
@available(SwiftStdlib 5.5, *)
@available(*, deprecated, message: "please use UnsafeContination<..., Error>")
public typealias UnsafeThrowingContinuation<T> = UnsafeContinuation<T, Error>

@available(SwiftStdlib 5.5, *)
@available(*, deprecated, renamed: "UnownedJob")
public typealias PartialAsyncTask = UnownedJob
2 changes: 2 additions & 0 deletions test/stdlib/Concurrency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import _Concurrency
// short-term source compatibility)
@available(SwiftStdlib 5.5, *)
extension PartialAsyncTask {
// expected-warning@-1 {{'PartialAsyncTask' is deprecated: renamed to 'UnownedJob'}}
// expected-note@-2 {{use 'UnownedJob' instead}}
}
@available(SwiftStdlib 5.5, *)
extension UnownedJob {
Expand Down