-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Read SwiftSyntax version for macro template from a configuration file #6774
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
Read SwiftSyntax version for macro template from a configuration file #6774
Conversation
Draft since does not actually come with a config file yet and doesn't handle the installation of it. |
f4ed941
to
36c3619
Compare
Should be ready now, but I wasn't able to test the installation locally because I am running into random CMake errors like:
|
@swift-ci please test |
This is an issue with the installation changes. |
In 5.9 we're using a version that's hard-coded in the template, but that is annoying to maintain. It also seems like ideally we would be using a version that's aligned with the toolchain that's being used. This adds a new configuration file that we can ship as 'usr/share/pm/config.json' in the toolchain to configure this. There's a fallback to the 5.9 version if we can't find the config and also a way to customize it when instantiating a `UserToolchain` in case a client needs to do that. rdar://113287350
fb84040
to
8da0662
Compare
@swift-ci please test |
@swift-ci please test windows |
8da0662
to
a5f17fe
Compare
Hadn't actually pushed my changes 🫠 |
@swift-ci please test |
@swift-ci please test windows |
Co-authored-by: Alex Hoppen <[email protected]>
@swift-ci please test |
@swift-ci please test windows |
…ndency version, causing error reading manifest This fixes a regression I believe was introduced in swiftlang#6774 where the new macro package template has its dependency on swift-syntax expressed as `from: "509.0.0."`, including an unncessary trailing period character. This causes an error reading the manifest. I have not tested this, but I experienced the bug and from source inspection believe this is likely the issue. Resolves rdar://117132800
…ndency version, causing error reading manifest (#7018) This fixes a regression I believe was introduced in #6774 where the new macro package template has its dependency on swift-syntax expressed as `from: "509.0.0."`, including an unncessary trailing period character. This causes an error reading the manifest. I have not tested this, but I experienced the bug and from source inspection believe this is likely the issue. Resolves rdar://117132800
In 5.9 we're using a version that's hard-coded in the template, but that is annoying to maintain. It also seems like ideally we would be using a version that's aligned with the toolchain that's being used. This adds a new configuration file that we can ship as 'usr/share/pm/config.json' in the toolchain to configure this. There's a fallback to the 5.9 version if we can't find the config and also a way to customize it when instantiating a
UserToolchain
in case a client needs to do that.rdar://113287350