swift-bundler
swift-bundler copied to clipboard
Support for Swift 5.9 (Swift Syntax)
Hey @stackotter!
Hope your holidays have been treating you well!
I have made some small revisions to support Swift 5.9 (bumping swift-syntax and swift-format to Swift 5.9). It required very little changes (though I did not run the formatter across the codebase) as seen from my revision here: https://github.com/furby-tm/swift-bundler/commit/42d095fd8501e4df5b8a6439771f9912f31b8741. I was curious if supporting Swift 5.9 at this time is something that you are interested in, if so - I can submit a PR for this, but I also know you are careful to support very specific versioning requirements in your efforts to allow clean Xcode archives for code signing within regards to app store submissions.
The main reason for the requirement to bump to Swift 5.9, at least in my use case, is to be able to add the swift-syntax dependency to my own package for use with Swift 5.9's macros, while still allowing to add the swift-bundler dependency to my package (else there are SwiftPM errors by using swift-syntax from: "509.0.0" since it conflicts with swift-bundler's exact: "0.50800.0-SNAPSHOT-2022-12-29-a".
Just let me know your thoughts! Thank you.
Yep I’d be happy to merge that! It doesn’t affect Swift Bundler projects cause it’s simply for code generation purposes, and keeping those sorts of common dependencies up to date is definitely important for people depending on Swift Bundler as a library; SwiftPM can be so annoying with those kinds of dependency clashes 😅 Additionally, 509.0.0 is the first stable version of Swift Syntax, which is yet another reason that this is a good idea 👌
@stackotter Hey! I am just now seeing this, awesome! I will submit a PR in that case:
SwiftPM can be so annoying with those kinds of dependency clashes 😅
Oh yeah 🦄, I really hope they can relax some of these strict requirements and miscellaneous dependency clashes at some point -- though to be fair, at least SwiftPM is abruptly clear about these potential conflicts, I suppose the opposite of this behavior is something similar to npm, where there is often an abundance of dependency conflicts and you end up with something that silently fails in a lot of places and makes debugging problems somewhat of a nightmare -- I'm undecided yet which approach is better here, but nonetheless it definitely gets annoying at times!
One Small Issue
Speaking of which, there is a dependency cycle which is pulling in Apple's swift-arg-parser in addition to your fork of this dependency, which clashes with each of these dependencies' respective GenerateManual plugin.
Proposed Solution
The workaround that I implemented here was to simply ensure your fork was not using the same name as Apple's GenerateManual and changed your fork to use a different name, GenManual instead. The underlying changes necessary for that fix can be reviewed here: https://github.com/wabiverse/swift-arg-parser/commit/41fc1c8f8482e321d46164df28c6ef672a42bc85 - which I will include as a dependency bump for that package, once we merge that into your fork, as apart of the PR for this issue.
Jug
@stackotter Here is PR (1 of 2) for supporting Swift 5.9 with SwiftBundler, this one for a package dependency of SwiftBundler, swift-arg-parser.
@stackotter I totally forgot to make the second PR (2 of 2) for this, doh! Here it is, long overdue 😅🎉.