Closed tshortli closed 1 month ago
This is a follow on to https://github.com/swiftlang/swift-package-manager/pull/7895.
@swift-ci test windows
IIRC _Concurrency
is not imported implicitly when building with CMake, that's why those imports were added in the first place
IIRC
_Concurrency
is not imported implicitly when building with CMake, that's why those imports were added in the first place
I see, I wonder if that is due to -disable-implicit-concurrency-module-import
getting passed down in CMake builds for some reason? It's hard for me to imagine a reason why that flag would be needed by anything in SwiftPM, maybe it's a mistake?
@swift-ci please test
Yeah, the flag seems to be intentional:
> rg disable-implicit-concurrency-module-import
Utilities/bootstrap
671: swiftpm_args += ["-Xswiftc", "-Xfrontend", "-Xswiftc", "-disable-implicit-concurrency-module-import"]
Sources/swift-bootstrap/main.swift
221: "-Xfrontend", "-disable-implicit-concurrency-module-import",
Maybe that dates from the days before _Concurrency
was available ubiquitously? In any case, I won't question it for now. I've put the imports back and tried to thread the needle differently.
Yeah, the flag seems to be intentional:
Can probably remove. It is indeed from before _Concurrency was always available. I recently removed it from the manifest build themselves, I just missed that bootstrap was also doing it.
@swift-ci please test Windows
SwiftPM doesn't build with all toolchains when the
InternalImportsByDefault
upcoming feature is properly enabled.Motivation:
With the upcoming feature
InternalImportsByDefault
enabled, some versions of the Swift compiler diagnose this pattern:Modifications:
Address these diagnostics by using correct access levels for direct imports of
_Concurrency
.Result:
SwiftPM builds with all relevant Swift compilers with
InternalImportsByDefault
enabled.