You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@95a2c6e555af:/tmp/x# swiftc -swift-version 6 test.swift && echo OK
OK
But running swift-format (default config) on it, breaks it:
$ swift format --in-place test.swift && swiftc -swift-version 6 test.swift && echo OK
test.swift:5:24: error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
3 |
4 | await Task {
5 | _ = fputs("hello\n", stderr)
| `- error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
6 | }.value
7 |
SwiftGlibc.stderr:1:12: note: var declared here
1 | public var stderr: UnsafeMutablePointer<FILE>!
| `- note: var declared here
This is because it changed the order of the imports from the correct
@preconcurrency import Glibc
import Foundation
to the incorrect
import Foundation
@preconcurrency import Glibc
This is swift-format from
Swift version 6.0.2 (swift-6.0.2-RELEASE)
Target: aarch64-unknown-linux-gnu
Uh oh!
There was an error while loading. Please reload this page.
Consider this program
compiles and runs just fine:
But running
swift-format
(default config) on it, breaks it:This is because it changed the order of the imports from the correct
to the incorrect
This is
swift-format
fromRelated issues:
The text was updated successfully, but these errors were encountered: