Skip to content

Commit 9236977

Browse files
authored
Bump swift-syntax in template to 602.0.0-latest (#8931)
`swift package init --type macro `generates a manifest that still points to swift-syntax version 6.0.0 although main has moved on to 6.0.2. Motivation: `swift package init --type macro` is outdated Modifications: Modified config.json that is shipped as part of the SDK and version provided by InstalledSwiftPMConfiguration Result: Locally verified that swift package init --type macro generates a manifest with the updated version. Performed a `swift build` using the updated manifest and confirmed version 6.2 of swift-syntax was used: > MacBook-Pro-207:package-testing rconnell$ swift build > Fetching https://github.com/swiftlang/swift-syntax.git from cache > Fetched https://github.com/swiftlang/swift-syntax.git from cache (0.65s) > Computing version for https://github.com/swiftlang/swift-syntax.git ... > Computed https://github.com/swiftlang/swift-syntax.git at 602.0.0-prerelease-2025-06-26 (13.67s) swift package init --type macro will output the latest version
1 parent 8a4b37f commit 9236977

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/PackageModel/InstalledSwiftPMConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct InstalledSwiftPMConfiguration {
3737
return .init(
3838
version: 0,
3939
swiftSyntaxVersionForMacroTemplate: .init(
40-
major: 600,
40+
major: 602,
4141
minor: 0,
4242
patch: 0,
4343
prereleaseIdentifier: "latest"

Tests/PackageModelSyntaxTests/ManifestEditTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ class ManifestEditTests: XCTestCase {
491491
let package = Package(
492492
name: "packages",
493493
dependencies: [
494-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.0-latest"),
494+
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "602.0.0-latest"),
495495
],
496496
targets: [
497497
.macro(

Utilities/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{"version":1,
2-
"swiftSyntaxVersionForMacroTemplate":{"major":600,"minor":0,"patch":0, "prereleaseIdentifier":"latest"},
2+
"swiftSyntaxVersionForMacroTemplate":{"major":602,"minor":0,"patch":0, "prereleaseIdentifier":"latest"},
33
"swiftTestingVersionForTestTemplate":{"major":0,"minor":8,"patch":0}}

0 commit comments

Comments
 (0)