Skip to content

[5.9] Improve Swift Macro template #6411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 11, 2023

Cherry-picks #6410 to release/5.9.


  • Use 4 spaces instead of 2 to be consistent with the other templates
  • Use BasicMacroExpansionContext( instead of BasicMacroExpansionContext.init
  • Add two newlines in the test method to improve readability
  • Depend on the latest 509.0.0 prerelease of SwiftSyntax instead of main.

@ahoppen
Copy link
Member Author

ahoppen commented Apr 11, 2023

@swift-ci Please smoke test

@@ -251,7 +251,8 @@ public final class InitPackage {
} else if packageType == .macro {
pkgParams.append("""
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", branch: "main"),
// Depend on the latest Swift 5.9 prerelease of SwiftSyntax
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0-swift-5.9-DEVELOPMENT-SNAPSHOT-2023-04-10-a"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this version what we want from a semantic versioning pov?

cc @neonichu

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neonichu and I discussed this and it’s what we want for now. As we approach the release, we want to change this to 509.0.0.

@ahoppen ahoppen merged commit e1fd996 into swiftlang:release/5.9 Apr 11, 2023
@ahoppen ahoppen deleted the ahoppen/5.9/template-fixes branch April 11, 2023 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants