Avatar
norio_nomura 7/26/2024 3:10 AM
linux版だとオプションの位置に関係なく出ないぽい。 $ pbpaste|swift -strict-concurrency=complete - <stdin>:8:13: warning: sending 'self'-isolated value of type 'S' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode 6 | 7 | func main(a: A) async { 8 | await a.foo() | `- warning: sending 'self'-isolated value of type 'S' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode 9 | } $ pbpaste|docker run --rm swiftlang/swift:nightly swift -strict-concurrency=complete - $ pbpaste|docker run --rm swiftlang/swift:nightly-6.0-jammy swift -strict-concurrency=complete - $ pbpaste|docker run --rm swift swift -strict-concurrency=complete -
3:15 AM
linux版nightlyだと、標準入力じゃなくても出ない。 $ docker run -it --rm swiftlang/swift:nightly ################################################################ # # # Swift Nightly Docker Image # # Tag: swift-DEVELOPMENT-SNAPSHOT-2024-07-22-a # # # ################################################################ root@6db06d8b9690:/# echo 'struct S: Sendable {} actor A { func foo(e: S = S()) {} } func main(a: A) async { await a.foo() }'>a.swift root@6db06d8b9690:/# swift -strict-concurrency=complete a.swift root@6db06d8b9690:/# swift -version Swift version 6.0-dev (LLVM 3427f33b53c666b, Swift c21a3a974d40e14) Target: aarch64-unknown-linux-gnu