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

Conflict with other macro package #5533

Closed
2 tasks done
Kyle-Ye opened this issue Apr 18, 2024 · 1 comment · Fixed by #5534
Closed
2 tasks done

Conflict with other macro package #5533

Kyle-Ye opened this issue Apr 18, 2024 · 1 comment · Fixed by #5534
Labels
integration Issues related to integration of SwiftLint into toolchains.

Comments

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Apr 18, 2024

New Issue Checklist

Describe the bug

We are some existing package dependency(eg. swift-testing and swift-power-assert) which has a dependency on swift-syntax.

eg. .from("509.0.0") .from("510.0.1")

But the latest version of SwiftLint has a exact version dependency on "swift-syntax".

eg. SwiftLint 0.54.0 has a exact "509.0.2"

.package(url: "https://github.com/apple/swift-syntax.git", exact: "509.0.2"),

This will cause a package resolution failing due to conflicting requirement.

Solution

Use more flexible requirement of "from" and adapt the diff API internally so that both swift-syntax 509 and 510 will work here.

(eg. #if canImport(SwiftSyntax509) and #if canImport(SwiftSyntax510))

https://github.com/apple/swift-syntax/blob/728e2f6d5f9fd4a8e45eab6e52e86ad1519a7e2a/Sources/SwiftSyntax/Documentation.docc/Macro%20Versioning.md?plain=1#L9-L33

@SimplyDanny SimplyDanny added the integration Issues related to integration of SwiftLint into toolchains. label Apr 20, 2024
@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 23, 2024

There is a blog post explaining the detail here.

https://www.pointfree.co/blog/posts/116-being-a-good-citizen-in-the-land-of-swiftsyntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Issues related to integration of SwiftLint into toolchains.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants