-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add Swift Macro Compatibility Check to CI #3406
Conversation
This PR adds a **Swift Macro Compatibility Check** GitHub Action to ensure that macro changes remain compatible across different versions of `swift-syntax`. The action automatically verifies compatibility with major `swift-syntax` versions (`509.0.0`, `510.0.0`, `600.0.0`), running builds and tests. It's also posible to turn on checking agains all versions of `swift-syntax`. #### Key Benefits: - **Automated Compatibility Checks**: No need to manually test changes across different `swift-syntax` versions—this is handled automatically in CI. - **Prevents Breakages**: Helps avoid accidentally committing changes that break older versions.
A run with all |
Wrapping up: checking against all versions of
for this repository, it takes approximately 8 minutes, but checking against only major versions:
takes 3 minutes. From my experience, running only against major versions is sufficient since swift-syntax does not introduce significant changes across major versions. @stephencelis @mbrandonw, please let me know which version you prefer. |
@Matejkob Might be nice to do major versions only. Should the major versions take the latest up to the next major? E.g.:
Or do you think compatibility with the earlier version in a major release is better? |
At the time I considered this, I concluded that the "major version" should correspond to the version of but if you @stephencelis think otherwise I can change it :> |
I'm marking it as a draft since I want to make one more change before we land it. But before that let's end discusing the above topic. |
I think it makes sense, just curious about the thought process 😄 Let us know when it's ready and we'll merge! |
@stephencelis it's ready; I've updated the script to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR adds a Swift Macro Compatibility Check GitHub Action to ensure that macro changes remain compatible across different versions of
swift-syntax
. The action automatically verifies compatibility with majorswift-syntax
versions (509.0.0
,510.0.0
,600.0.0
), running builds and tests. It's also posible to turn on checking agains all versions ofswift-syntax
.Key Benefits:
swift-syntax
versions—this is handled automatically in CI.