Skip to content

Conversation

SimplyDanny
Copy link
Collaborator

If SwiftLint is built from this state using the Swift SDK, we'll get a large self-contained Linux executable that runs without loading SourceKit. It can do that by disabling any rule that requires SourceKit.

With SWIFTLINT_DISABLE_SOURCEKIT set on a normally (dynamically linked) binary, the behavior is the same. That's different from the previously reported more serious warnings.

This step makes sense now that there's only a handful of SourceKit-based rules left. The most critical one would be custom_rules. With #6129, there's a solution in sight, though.

I'm yet undecided whether to additionally provide these full static binaries as release artifacts from now on ...

@SwiftLintBot
Copy link

SwiftLintBot commented Aug 29, 2025

1 Warning
⚠️ This PR may need tests.
18 Messages
📖 Building this branch resulted in a binary size of 26840.88 KiB vs 26777.4 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.81 s vs 0.82 s on main (1% faster).
📖 Linting Alamofire with this PR took 1.02 s vs 1.01 s on main (0% slower).
📖 Linting Brave with this PR took 6.9 s vs 6.94 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 20.3 s vs 20.32 s on main (0% faster).
📖 Linting Firefox with this PR took 10.48 s vs 10.44 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.74 s vs 7.75 s on main (0% faster).
📖 Linting Moya with this PR took 0.44 s vs 0.44 s on main (0% slower).
📖 Linting NetNewsWire with this PR took 2.39 s vs 2.38 s on main (0% slower).
📖 Linting Nimble with this PR took 0.64 s vs 0.64 s on main (0% slower).
📖 Linting PocketCasts with this PR took 7.13 s vs 7.21 s on main (1% faster).
📖 Linting Quick with this PR took 0.42 s vs 0.4 s on main (4% slower).
📖 Linting Realm with this PR took 3.45 s vs 3.45 s on main (0% slower).
📖 Linting Sourcery with this PR took 1.84 s vs 1.85 s on main (0% faster).
📖 Linting Swift with this PR took 4.28 s vs 4.28 s on main (0% slower).
📖 Linting VLC with this PR took 1.12 s vs 1.12 s on main (0% slower).
📖 Linting Wire with this PR took 17.03 s vs 17.07 s on main (0% faster).
📖 Linting WordPress with this PR took 10.03 s vs 10.01 s on main (0% slower).

Generated by 🚫 Danger

@SimplyDanny SimplyDanny force-pushed the static-executable branch 3 times, most recently from e4cc101 to ae5af43 Compare August 30, 2025 13:22
If SwiftLint is built from this state using the Swift SDK, we'll get a
large self-contained Linux executable that runs without loading SourceKit.
It can do that by disabling any rule that requires SourceKit.

With `SWIFTLINT_DISABLE_SOURCEKIT` set on a normally (dynamically linked)
binary, the behavior is the same. That's different from the previously
reported more serious warnings.
@SimplyDanny SimplyDanny enabled auto-merge (squash) August 30, 2025 13:40
@SimplyDanny SimplyDanny merged commit 77050e8 into main Aug 30, 2025
21 of 22 checks passed
@SimplyDanny SimplyDanny deleted the static-executable branch August 30, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants