Skip to content

feat: Update README.md#37

Open
maximkrouk wants to merge 1 commit intostackotter:mainfrom
maximkrouk:readme-swift-syntax-override-guide
Open

feat: Update README.md#37
maximkrouk wants to merge 1 commit intostackotter:mainfrom
maximkrouk:readme-swift-syntax-override-guide

Conversation

@maximkrouk
Copy link
Copy Markdown
Contributor

Added a guide on bypassing swift-syntax version resolution

Note

Some of my dependencies prevent me from using latest version of swift-macro-toolkit, but by depending on local swift-syntax fork I managed to bypass swift-syntax version resolution. It's too small piece of knowledge to make some article about, but I think some folks may find it really helpful and swift-macro-toolkit looks like a right place to mention it.

@maximkrouk maximkrouk force-pushed the readme-swift-syntax-override-guide branch from 169d4a0 to d0c1bc5 Compare March 7, 2026 15:05
@stackotter
Copy link
Copy Markdown
Owner

Are you saying that if your app depends on a local swift-syntax checkout, SwiftPM then uses that swift-syntax checkout for swift-macro-toolkit as well?

@maximkrouk
Copy link
Copy Markdown
Contributor Author

Nope, for example:

Afair standard resolution checked out swift-macro-toolkit at 0.7.x. It couldn't use 0.8.0 because TCA (and some of it's deps) limited swift-syntax to 602

I simply cloned swift-syntax to a local directory and added a local dependency to app's Package.swift, since swift-syntax version was resolved as a local clone, it's no longer limiting swift-macro-toolkit

Sure it may not always work, but at least worked with 603 and likely to work in most cases as long as swift version matches (6xy/7xy etc)

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