Closed jbelkins closed 2 months ago
Xcode 14.0.1
Build version 14A400
Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: x86_64-apple-macosx12.0
https://github.com/apple/swift-collections?tab=readme-ov-file#project-status
It looks like the swift-collections 1.1.x package requires Swift 5.7.2 and Xcode 14.2.
It looks like the swift-collections 1.1.x package requires Swift 5.7.2 and Xcode 14.2.
Surprising that a breaking change like dropping toolchain version(s) would be made in a minor version bump. In any case, if this was intentional and my use of an unsupported Swift version was the cause of the failure, the maintainers may close this issue.
Testing every minor release ever shipped for a major Swift release (such as 5.7) would be prohibitively expensive, so we only ran prerelease tests on the latest point releases (in this case, 5.7.2 on Apple platforms and 5.7.3 on Linux). Point releases contain critical bug fixes, so my general expectation is that upgrading to them would be much easier (i.e., a much easier sell) than upgrading to a new major Swift release.
However, I did not expect that primary associated types only became usable in 5.7.1+ -- that is an unpleasant surprise. This is quite a pickle, especially as the SwiftPM manifest header does not allow packages to require specific point releases.
I'm tempted to ask you to upgrade to 5.7.2 if possible. If this problem turns out to affect many clients, then plan B would be to immediately bump the requirement to 5.8 in a new tag and to roll back the 1.1.0 tag.
(We could technically also roll back the introduction of the some Sequence<Foo>
syntax, but it's not a trivial change, and given the option, I overwhelmingly prefer to move forward, not back.)
the SwiftPM manifest header does not allow packages to require specific point releases
https://developer.apple.com/documentation/PackageDescription/Package#overview
@lorentey Hmm… this documentation has an example of requiring a point release (swift-tools-version:3.0.2
)… is that not going to help us here?
Unfortunately, that doesn't seem to work. 😞
@lorentey Hmm… are we running into one of these code paths that is zeroing the patch version?
Perhaps! The quick smoke test I ran was this:
$ head -1 Package.swift
// swift-tools-version:5.9.2
$ xcrun swift --version
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
$ xcrun swift build
error: 'swift-collections': package 'swift-collections' is using Swift tools version 5.9.2 but the installed version is 5.9.0
error: ExitCode(rawValue: 1)
[0/1] Planning build
error: 'swift-collections': package 'swift-collections' is using Swift tools version 5.9.2 but the installed version is 5.9.0
Looking closer, this may be because what SwiftPM believes to be its version number does not match the toolchain's version:
$ xcrun swift package --version
Swift Package Manager - Swift 5.9.0
In Swift 5.7.2, SwiftPM reports itself as "5.7.1" (🤨), so perhaps setting the package manifest to that would have been a workable option. (The 1.1.0 tag is out, so if we want this adjusted, then that would need to be done in a new tag, with 1.1.0 removed altogether. At this moment, I don't know if doing that would be worth the disruption of a disappearing tag.)
I'm facing this same issue on monterey, have you figured out any solution yet?
The solution is to upgrade to Xcode 14.2 with Swift 5.7.2. Do you have a reason for not doing that?
My MacBook doesn’t support any higher Xcode versions On 2024. Feb 19., Mon at 2:00, Karoy Lorentey @.***> wrote:
The solution is to upgrade to Xcode 14.2 with Swift 5.7.2. Do you have a reason for not doing that?
— Reply to this email directly, view it on GitHub https://github.com/apple/swift-collections/issues/359#issuecomment-1951523877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMP2BFXAEKNYWD6IRA3WSY3YUKP25AVCNFSM6AAAAABDACUY2WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGUZDGOBXG4 . You are receiving this because you commented.Message ID: @.***>
Xcode 14.2 requires macOS 12.5, just like Xcode 14.0.
When building swift-collections on macOS 12 / Xcode 14.0.1 / destination 'platform=OS X', the package fails to compile. The same macOS version and Xcode version compile successfully for the iOS & tvOS platforms, as well as for every other combination of host OS / Xcode version / target OS I have tried.
Relevant logs from the compile failure:
A link to an example failed compile on Github CI: https://github.com/smithy-lang/smithy-swift/actions/runs/7832430857/job/21371108130?pr=660
Information
Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50) Target: x86_64-apple-macosx12.0