Skip to content
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

[Proposal] Add Swift Macro Compatibility Check GitHub Action #197

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

Matejkob
Copy link
Contributor

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.

@Matejkob
Copy link
Contributor Author

@mbrandonw @stephencelis I’d love to hear your thoughts on this! I've been using such a script in my internal macros as well as my open-source macro swift-spyable for a while and it's huge improvment. Today, finally, I have managed to find time to make a GitHub Action out of it that can be used across diffrent repos to ensure that all macros are good swift-syntax citizens ;) I think integrating this action would be a nice first step forward in ensuring compatibility with multiple versions of swift-syntax in the whole ecosystem in general.

In my opinion, this addition adds a layer of safety without introducing much overhead since the process is fully automated. Plus, it provides quick feedback on any potential issues.

What do you think? Do you see this as a positive step? I'd love to discuss any concerns or suggestions you may have!

@stephencelis
Copy link
Member

@Matejkob Cool! @mbrandonw and I will discuss early next week 😄

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

We're gonna give this a shot! A main worry we had was CI time, but it doesn't take an exorbitant amount of time, and hopefully it'll save us sometime in the future.

If it every breaks in the future we may disable and ping you, but for now let's do it!

@stephencelis stephencelis merged commit 55a29e9 into pointfreeco:main Sep 23, 2024
4 checks passed
@Matejkob Matejkob deleted the patch-1 branch September 24, 2024 08:16
@Matejkob
Copy link
Contributor Author

We're gonna give this a shot! A main worry we had was CI time, but it doesn't take an exorbitant amount of time, and hopefully it'll save us sometime in the future.

If we don't run tests—only build the project—the time spent is very reasonable, as running the clean action isn't required between each iteration. The current setup checks against all versions of swift-syntax, but I've noticed that the impact compared to only checking major versions is not significant in terms of CI usage.

Speaking of saving time in the future, it has already saved me twice, so hopefully, it will be useful to you as well.

If it every breaks in the future we may disable and ping you, but for now let's do it!

Sure thing, thanks!

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.

2 participants