← Back to Pull requests

[build-script-helper] Add caching support for Swift compilation #2125

Closed
unknown closed this pull request without merging on May 05, 2026 18:36 UTC
View on GitHub
unknown unknown commented on Apr 23, 2026 18:04 UTC
Author

Forward --enable-caching, --caching-cas-path, --caching-plugin-path, --caching-plugin-option, --caching-prefix-map, and --caching-enable-mccas flags from the Swift build script. When enabled, appends explicit module build, compilation caching, plugin, prefix mapping, and CAS backend Swift compiler flags.

rdar://155876033

Assisted-By: Claude

<!--
The main branch is now in convergence, which means major changes, such as large refactoring or new features, should be avoided. This strategy is intended to maintain the stability of the Swift 6.4 release leading up to the May 4th branch. For any work that requires broad changes or introduces new features, create a feature branch and open a draft pull request. All updates to the swiftlang/swift-driver repository’s main branch require approval from the release managers. A pull request targeting swiftlang/swift-driver will automatically add release managers. You can also contact them via @release-managers in the forum group.
-->

<!-- Please fill out the following form: -->

  • Explanation: swift-driver build system change for: https://github.com/swiftlang/swift/pull/88608

  • <!--
    A description of the changes. This can be brief, but it should be clear.
    -->
  • Scope: Support caching build from build-script. NFC outside that.

  • <!--
    An assessment of the impact and importance of the changes. For example, can
    the changes break existing code?
    -->
  • Issues: rdar://155876033

  • <!--
    References to issues the changes resolve, if any.
    -->
  • Risk: Low. NFC outside new function added.

  • <!--
    The (specific) risk to the release for taking the changes.
    -->

    <!--
    Before merging this pull request, you must run the Swift continuous integration tests.
    For information about triggering CI builds via @swift-ci, see:
    https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

    Thank you for your contribution to Swift!
    -->

    Diff: 245 lines (+183 / -62) across 3 files Reviewer: edymtt Review duration: 17312m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 245 lines diff across 3 files
    0.44
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #2125"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.9% (MEDIUM) · Higher = larger blast radius
    43.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.3% · Safe to merge
    17.3%