Repository navigation
Drop the nondeterministic type-check timing flags from the engine build - #388
Merged
Merged
Conversation
-warn-long-function-bodies / -warn-long-expression-type-checking measure how long the compiler took, which varies with a CI runner's load; with every warning an error they made the build nondeterministic. They failed #384's merge-queue compile on a test that took 729 ms against the 500 ms limit, while the run beside it passed. Every remaining strict setting gives the same answer on every machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
mainshows a ❌One of #384's merge-queue
compileruns failed with:The other merge-group run on the same commit passed.
#384 added
-warn-long-function-bodies=500and-warn-long-expression-type-checking=500. With.treatAllWarnings(as: .error)on, any function that took longer than 500 ms to type-check failed the build. That time depends on how loaded the CI runner is, so the build was nondeterministic: the same code passes on one runner and fails on another. That's the wall-clock flakiness #380 is removing from the tests. The flags shouldn't have gone in alongside warnings-as-errors.Fix
Remove both timing flags from
Package.swiftand the matching list inscripts/ios-typecheck.sh, and explain inPackage.swiftwhy they're excluded. Everything else from #384 stays:ExistentialAny,MemberImportVisibility,InternalImportsByDefault,InferIsolatedConformances,ImmutableWeakCaptures-require-explicit-sendableAll of these give the same answer on every machine.
Verified: the strict
swift build --build-testsis clean,scripts/ios-typecheck.shpasses, and shellcheck and shfmt are clean.🤖 Generated with Claude Code