Skip to content

Disable swiftformat wrap and redundantInit rules to fix spec update timeout - #472

Merged
cguldner merged 1 commit into
dropbox:masterfrom
cguldner:fix-swiftformat-timeout
Jul 23, 2026
Merged

Disable swiftformat wrap and redundantInit rules to fix spec update timeout#472
cguldner merged 1 commit into
dropbox:masterfrom
cguldner:fix-swiftformat-timeout

Conversation

@cguldner

Copy link
Copy Markdown
Contributor

Summary

Disables the wrap and redundantInit SwiftFormat rules, which trip SwiftFormat's internal per-rule timeout on the very large generated files on CI runners.

Problem

After #471 added a SwiftFormat step to the spec update workflow, the "Format generated code" step ran for ~43 minutes and then failed with exit code 70:

error: redundantInit rule timed out in .../DBXTeamLog.swift.
error: wrap rule timed out in .../Team.swift.
...

DBXTeamLog.swift is ~66k lines, and these two rules are superlinear on file size. On the slower CI runners they exceed SwiftFormat's built-in per-rule wall-clock timeout.

Fix

Disable wrap and redundantInit. Both are verified no-ops on the current generated output, so disabling them does not change any formatting — it only lets the format step finish.

Test plan

  • swiftformat Source/SwiftyDropbox/Shared/Generated Source/SwiftyDropboxObjC/Shared/Generated reports 0/89 files formatted with the updated config
  • Re-trigger the spec update workflow and confirm the format step completes and the PR has minimal diffs

🤖 Generated with Claude Code

These two rules trip SwiftFormat's internal per-rule timeout on the
very large generated files (DBXTeamLog.swift is ~66k lines) when run
on CI's slower runners, causing the spec update workflow's format
step to fail with exit code 70 after ~40 minutes.

Both rules are verified no-ops on the current generated output, so
disabling them keeps formatting identical while letting the format
step complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cguldner
cguldner merged commit 9901480 into dropbox:master Jul 23, 2026
3 checks passed
@cguldner
cguldner deleted the fix-swiftformat-timeout branch July 23, 2026 17:24
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.

1 participant