-
Notifications
You must be signed in to change notification settings - Fork 128
Fix build failure when building with pre-6.2 toolchain due to unrecognized unsafe keyword
#1093
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
Fix build failure when building with pre-6.2 toolchain due to unrecognized unsafe keyword
#1093
Conversation
…nized `unsafe` keyword
|
@swift-ci please test 6.1 |
|
@swift-ci please test |
|
When building from source locally with the release 6.1 toolchain, I'm seeing the compiler continue to complain that "Attribute requires '-enable-experimental-feature AllowUnsafeAttribute'" on #if hasFeature(AllowUnsafeAttribute)
@unsafe
#endif |
That should be fixed by #1084. Or, are you saying your local checkout has that fix but you're still seeing this error? With that fix plus this PR, I am able to build using the 6.1 release toolchain successfully. |
|
Did a clean build and it's gone. Disregard! |
|
The macOS and Linux CI failures are expected to be resolved by swiftlang/swift#80830, but the release of a new |
This fixes another bit of fallout from #1069 when building this project's test targets with a 6.1 (or any pre-6.2) toolchain.
The
unsafekeyword was introduced in 6.2 as part of SE-0458: Opt-in Strict Memory Safety Checking. Older toolchains are not aware of it, so the fix is to avoid emitting expressions involving that keyword when the macro plugin has been built using an older toolchain.Checklist: