-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
swiftlint 0.56.1 #180295
swiftlint 0.56.1 #180295
Conversation
|
ad299a3
to
86b15d1
Compare
I don't really understand what's going on here. The API calls that err in the macOS 12 build require Swift 5.8. At least that's when they were added. However, Apply claims macOS 10.10+. This builds with Swift 5.10 but the Homebrew provided Swift package doesn't contain a Swift standard library, does it? What I see in another build is that it links against the SDK that comes with Xcode 14.2 and certainly contains an older standard library. |
@chenrui333: Is it intended that Homebrew's Swift toolchain doesn't come with a stdlib? |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a |
It should come with a stdlib IIUC, but @Bo98 should be able to answer more questions here. |
It is somewhat intentional yeah. Purpose of the Swift toolchain in Homebrew was more so you can use newer Swift dev toolchains on older macOS (given the quick dropping of support of older macOS in Xcode) rather than being a replacement for libswift that ships with the OS. We currently treat libswift similar to libc: if you need features only available in newer runtime libraries, it probably doesn't really run outside of Homebrew on that macOS anyway. So the Homebrew Swift toolchain on macOS is always a buildtime-only dependency and never a runtime dependency. On Linux it's a bit different where the full standard library is shipped because there is no OS support there obviously, though may be static linked in the future depending on SE-0342. Do note that Apple is dropping macOS 12 support in a matter of weeks and we won't have macOS 12 CI anymore, so don't feel like you have to spend a disproportionate amount of time on this if you do want to make SwiftLint 0.56.0 require Ventura or later. |
Homebrew's Swift as a buildtime dependency would be sufficient for SwiftLint to build. There is no runtime dependency. What I understood (and that can be wrong) is that the Swift standard library for newer Swift versions can provide new APIs that internally call to implementations still provided by the OS. The APIs that break the build for macOS 12 at the moment should work down to macOS 10.10, but Swift <5.8 just doesn't have an interface to it. And since macOS 12 doesn't include the newer Swift standard library either, any Swift compiler >5.7 just cannot locate the symbols. So including the standard library into Homebrew's toolchain would still be of benefit. Please let me know if my understanding is correct.
This is a very valuable note and most likely the way to go in this case. I've actually spent too much time on this problem already. |
86b15d1
to
2137035
Compare
2137035
to
523bf81
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a |
🤖 An automated task has requested bottles to be published to this PR. |
Created with
brew bump-formula-pr
.