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

Add Swift Macro Compatibility Check GitHub Action #307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Matejkob
Copy link

@Matejkob Matejkob commented Oct 5, 2024

This pull request introduces the Swift Macro Compatibility Check GitHub Action into the CI workflow. This action verifies that the Swift package remains compatible with multiple versions of swift-syntax, which is critical for macro-based functionality.

Motivation for Adding This Check:

  1. swift-syntax Versioning Complexity: As detailed by Point-Free in their article, "Being a good citizen in the land of SwiftSyntax", swift-syntax employs a versioning scheme where minor versions of Swift correspond to major versions of swift-syntax (e.g., SwiftSyntax 509.0 maps to Swift 5.9). This scheme introduces complexity in maintaining compatibility across versions.

  2. Frequent Breaking Changes: Minor releases of swift-syntax have introduced breaking changes, which can cause issues with existing macros and dependencies. This action helps ensure that our macros remain functional across these versions.

  3. Dependency Graph Resolution: By testing against multiple versions, we can prevent dependency conflicts in the broader Swift ecosystem. This is essential, especially as more libraries are adopting macros and using swift-syntax, increasing the likelihood of conflicting dependencies.

  4. Proactive Development: Catching compatibility issues early in the development cycle allows us to resolve them before they become critical, reducing the risk of blocked releases or difficult debugging sessions later.

Important

To ensure the library can be used alongside others in the Swift packages, it need to support all versions of swift-syntax. Without this compatibility, users may face issues where they can't use several libraries together if they depend on different versions of swift-syntax.

@Matejkob Matejkob requested a review from a team as a code owner October 5, 2024 10:37
@CLAassistant
Copy link

CLAassistant commented Oct 5, 2024

CLA assistant check
All committers have signed the CLA.

@kyleve kyleve requested a review from watt October 5, 2024 17:21
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