Open jkmathew opened 2 weeks ago
Synced to Apple’s issue tracker as rdar://137309661
Unfortunately we've had to manually update the version number when cutting a release, and that can get overlooked easily. I know I've done it in the past.
IIRC, a recent change in SwiftPM has added a package API to query Git repository information and generate constants that we could reference from the --version
handler instead. I would need to look further into it to see if that works as intended when a release is tagged and built.
cc @ahoppen who is in charge of releases.
I see there is already an automation implemented here Tags containing proper versions like https://github.com/swiftlang/swift-format/blob/93ebb779c07dad2598919de8202d6df1f97189d4/Sources/swift-format/PrintVersion.swift#L15
I hope Xcode 16.1 release will have the proper version 🙂
I am using Xcode 16 which comes with a bundled
swift format
. When I runswift format --version
, it printsmain
. Does this mean theswift format
bundled with Xcode will always be updated with the latest main branch? Or the bundled version is the latest from the main branch at the time of Xcode release is created?I tried installing swift-format with homebrew and
swift-format --version
prints the version correctly.