Skip to content

[6.0][Concurrency] Fix preconcurrency downgrade behavior for Sendable closures and generic requirements. #77476

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 7 commits into from
Nov 12, 2024

Conversation

hborla
Copy link
Member

@hborla hborla commented Nov 8, 2024

…ures.

Sendable violations inside `@preconcurrency @Sendable` closures should be
suppressed in minimal checking, and diagnosed as warnings under complete
checking, including the Swift 6 language mode.

(cherry picked from commit d2d317a)
to warnings even in Swift 6.

(cherry picked from commit a31a9d3)
…lures to

warnings in Swift 6 mode.

(cherry picked from commit e21bf2f)
@hborla hborla requested a review from a team as a code owner November 8, 2024 04:55
@hborla
Copy link
Member Author

hborla commented Nov 8, 2024

@swift-ci please test

@DougGregor
Copy link
Member

/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.0/swift/test/Concurrency/predates_concurrency_swift6.swift:183:25: error: expected note not produced
class NotSendable {} // expected-note 2 {{class 'NotSendable' does not conform to the 'Sendable' protocol}}
                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    
/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.0/swift/test/Concurrency/predates_concurrency_swift6.swift:190:6: error: expected warning not produced
  // expected-warning@-1 {{type 'NotSendable' does not conform to the 'Sendable' protocol}}
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

erasure expressions for arguments to `@preconcurrency` functions in Swift
6 mode.

(cherry picked from commit 806de5a)
@hborla
Copy link
Member Author

hborla commented Nov 8, 2024

Heh, on release/6.0, predates_concurrency_swift6.swift passes -disable-availability-checking

// RUN: %target-swift-frontend -disable-availability-checking -swift-version 6 %s -emit-sil -o /dev/null -verify

@hborla
Copy link
Member Author

hborla commented Nov 8, 2024

@swift-ci please test

2 similar comments
@hborla
Copy link
Member Author

hborla commented Nov 9, 2024

@swift-ci please test

@hborla
Copy link
Member Author

hborla commented Nov 9, 2024

@swift-ci please test

@hborla hborla force-pushed the 6.0-preconcurrency-downgrade branch from 4dbc06e to 1585f60 Compare November 11, 2024 17:39
@hborla
Copy link
Member Author

hborla commented Nov 11, 2024

@swift-ci please test

@hborla hborla merged commit 60ed12e into swiftlang:release/6.0 Nov 12, 2024
5 checks passed
@hborla hborla deleted the 6.0-preconcurrency-downgrade branch November 12, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants