Repository navigation
[Swift in WebKit] Promote VariableNeverMutated and UnusedImportAccess to errors - #77427
Open
rr-codes wants to merge 1 commit into
Conversation
Collaborator
|
EWS run on previous version of this PR (hash c0f5ddb) Details
|
… to errors https://bugs.webkit.org/show_bug.cgi?id=327982 rdar://190336417 Reviewed by NOBODY (OOPS!). Treat the VariableNeverMutated and UnusedImportAccess Swift diagnostic groups as errors instead of warnings. In the Xcode build, both are only errors with SDKs that ship Swift 6.4 or later, since the build still has to support Swift 6.3. With Swift 6.3, the existing violations can't be fixed (rdar://170907318) or suppressed (`@diagnose` is unavailable). In the CMake build, this also fixes NoUsage and NoUseUnstructuredThrowingTask never being enforced. They were gated on CMAKE_Swift_LANGUAGE_VERSION, which is never set, and WebKitSwiftFlags.cmake is included before enable_language(Swift), so no Swift version variable is available at that point anyway. The gate kept unknown warning groups on older toolchains from failing the build, but that can no longer happen since Swift warnings are no longer treated as errors, so remove it to match Xcode. * Configurations/CommonBase.xcconfig: * Source/WebGPU/WebGPU/CommandEncoder.swift: (WebGPU.beginRenderPass(_:)): * Source/WebKit/UIProcess/API/Swift/WebPage+ImmersiveEnvironment.swift: * Source/WebKit/UIProcess/Cocoa/TextExtraction/WKWebView+TextExtraction.swift: * Source/WebKit/_WebKit_SwiftUI/CrossImportOverlay.swift: * Source/cmake/WebKitSwiftFlags.cmake:
rr-codes
force-pushed
the
eng/Swift-in-WebKit-Promote-VariableNeverMutated-and-UnusedImportAccess-to-errors
branch
from
October 18, 2026 04:47
c0f5ddb to
a8d48f5
Compare
Collaborator
|
EWS run on current version of this PR (hash a8d48f5) Details
|
rr-codes
requested review from
aprotyas,
hortont424,
jesxilin,
lilyspiniolas,
megangardner,
pascoej,
pxlcoder and
whsieh
October 18, 2026 04:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧪 api-mac
🧪 jsc-x86-64
a8d48f5
a8d48f5