-
Notifications
You must be signed in to change notification settings - Fork 152
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
Update OS and arch grammar according the open source Swift repo #225
Conversation
What's your idea on this? cc @amartini51 |
01d6c27
to
13b07f4
Compare
I don't think we should make this change. As noted in the in-source comment below this grammar block:
Are there officially supported OSes or architectures that are missing from TSPL's list? It might be ok to add As an aside: This PR would be easier to review if you added things first, and then re-ordered them in a separate commit. |
Answers
I can see
Got it. The order is kept as how they appear in the source repository. I'll update to keep the original item order and add other items after them in a separate commit. QuestionsHere is my questions:
IMO They should either go to Apple's documentation or TSPL to check for all the possible arches Swift support to update their code instead of digging into the Swift(Swift Compiler) repo.
I can't find anything string about visionOS here in apple/swift. I guess it is reasonable since it is still beta and no release version of Xcode has visionSDK too. I think the content in TSPL should be aligned with apple/swift. If Apple has not merged such patch, we should not present it here too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only OSes and architectures that are officially supported should be listed.
I'm getting confirmation on whether arm64_32 is officially supported. If it is, we should add it here. OSX was intentionally removed from the list in 1f4cffc |
Update:
For OSes: Only Apple's OS, Linux and Windows are officially supported. So I'll remove the others. For architectures, |
Initial feedback is that we shouldn't add |
Context:
I was adding some
#if os(xx)
to detect the pointer size on my package, and they failed to build on watchOS platform. I realized I have missed some arch for it. (eg.armv7k
andarm64_32
)I checked the grammar page on TSPL. They are both not supported according to TSPL grammar here. And actually
arm64_32
is supported andarmv7k
is not which will hitos(arm)
here.This PR updates the corresponding grammar rule according to https://github.com/apple/swift
I did not find the exact grammar parsing logic so there may be some missing item. But I have checked what I list here are all supported on Swift 5.9
visionOS is not added on upstream open source Swift yet. And they are only supported on Xcode's Swift toolchain. (eg. Xcode 14.0)
Building the following code on Linux with the latest Swift release(Swift 5.9.2) will give us a warning here.
For Arch, I use the following source
For OS, I use the following source