Skip to content
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

Merged
merged 2 commits into from
Aug 17, 2024
Merged

Conversation

SimplyDanny
Copy link
Contributor

Created with brew bump-formula-pr.

@github-actions github-actions bot added swift Swift use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Aug 6, 2024
@chenrui333
Copy link
Member

  /private/tmp/swiftlint-20240806-7938-9p76mj/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxRewriter.swift:3917:35: error: incorrect argument label in call (have 'fromContentsOf:', expected 'from:')
            _ = newLayout.initialize(fromContentsOf: node.raw.layoutView!.children)
                                    ^~~~~~~~~~~~~~~
                                     from
  /private/tmp/swiftlint-20240806-7938-9p76mj/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxRewriter.swift:3935:17: error: value of type 'UnsafeMutableBufferPointer<RawSyntax?>' has no member 'deinitialize'
        newLayout.deinitialize()
        ~~~~~~~~~ ^~~~~~~~~~~~
  error: fatalError

@chenrui333 chenrui333 added build failure CI fails while building the software CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. labels Aug 8, 2024
@chenrui333 chenrui333 force-pushed the bump-swiftlint-0.56.0 branch from ad299a3 to 86b15d1 Compare August 8, 2024 17:19
@SimplyDanny
Copy link
Contributor Author

SimplyDanny commented Aug 9, 2024

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.

@SimplyDanny
Copy link
Contributor Author

@chenrui333: Is it intended that Homebrew's Swift toolchain doesn't come with a stdlib?

Copy link
Contributor

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 help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Aug 12, 2024
@carlocab
Copy link
Member

@chenrui333: Is it intended that Homebrew's Swift toolchain doesn't come with a stdlib?

It should come with a stdlib IIUC, but @Bo98 should be able to answer more questions here.

@github-actions github-actions bot removed the stale No recent activity label Aug 12, 2024
@Bo98
Copy link
Member

Bo98 commented Aug 12, 2024

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.

@SimplyDanny
Copy link
Contributor Author

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.

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.

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.

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.

@SimplyDanny SimplyDanny force-pushed the bump-swiftlint-0.56.0 branch from 86b15d1 to 2137035 Compare August 12, 2024 21:25
@SimplyDanny SimplyDanny changed the title swiftlint 0.56.0 swiftlint 0.56.1 Aug 12, 2024
@SimplyDanny SimplyDanny force-pushed the bump-swiftlint-0.56.0 branch from 2137035 to 523bf81 Compare August 12, 2024 21:29
Copy link
Contributor

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 help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Aug 15, 2024
@github-actions github-actions bot closed this Aug 16, 2024
@chenrui333 chenrui333 reopened this Aug 17, 2024
@chenrui333 chenrui333 added in progress Stale bot should stay away and removed stale No recent activity build failure CI fails while building the software labels Aug 17, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Aug 17, 2024
@BrewTestBot BrewTestBot enabled auto-merge August 17, 2024 14:16
@BrewTestBot BrewTestBot added this pull request to the merge queue Aug 17, 2024
Merged via the queue into Homebrew:master with commit 961217a Aug 17, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. in progress Stale bot should stay away swift Swift use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants