Skip to content
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

DispatchQoS and DispatchSpecificKey should have consistent Sendable conformances between macOS and linux #76773

Closed
tayloraswift opened this issue Sep 29, 2024 · 5 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. off topic Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)

Comments

@tayloraswift
Copy link
Member

Description

the DispatchQoS and DispatchSpecificKey are conditionally Sendable on macOS, but not on linux for some reason, which creates a needless portability barrier for developers that aim to support both platforms.

Reproduction

import Dispatch
func f()
{
    let x:DispatchQoS = { fatalError() }()
    Task.init
    {
        let y:DispatchQoS = x
        let _ = y
    }
    Task.init
    {
        let y:DispatchQoS = x
        let _ = y
    }
}

Expected behavior

the types should have consistent conformances across platforms

Environment

$ swiftc --version
Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu

Additional information

the original context was attempting to build GRDB.swift on linux

@tayloraswift tayloraswift added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Sep 29, 2024
@jamieQ
Copy link
Contributor

jamieQ commented Oct 1, 2024

this seems like a duplicate of: swiftlang/swift-corelibs-libdispatch#845 (or is at least closely related)

@AnthonyLatsis AnthonyLatsis added the transfer candidate The issue may belong in another repository label Oct 1, 2024
@AnthonyLatsis
Copy link
Collaborator

@parkera Are you able to transfer this?

@AnthonyLatsis AnthonyLatsis removed the triage needed This issue needs more specific labels label Oct 1, 2024
@ktoso
Copy link
Contributor

ktoso commented Oct 1, 2024

@rokhinip would have the power to do so; I don't sadly.

@ktoso
Copy link
Contributor

ktoso commented Oct 1, 2024

It seems we can't transfer issues cross org; @tayloraswift please open this on corelibs dispatch, we can't do anything about it in swiftlang/swift.

@ktoso ktoso closed this as completed Oct 1, 2024
@AnthonyLatsis AnthonyLatsis added off topic Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.) and removed transfer candidate The issue may belong in another repository labels Oct 1, 2024
@AnthonyLatsis
Copy link
Collaborator

It seems we can't transfer issues cross org

Ah, yeah, I thought GCD made it into swiftlang too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. off topic Resolution: Is beyond the scope of the Swift project (Xcode, proprietary Apple frameworks, etc.)
Projects
None yet
Development

No branches or pull requests

4 participants