Skip to content

[Build] Preflight and repair invalid SwiftPM repository caches #210

Description

@stephenlclarke

Defect

A clean linked worktree can enter a nominally cached SwiftPM resolve with missing maintenance.lock metadata. SwiftPM then emits repeated skipping cache warnings and refetches/recomputes the dependency graph instead of failing fast or repairing the cache once.

Evidence

On 6 September 2026, swift test --filter EngineSocketGrantTests reported the missing lock for many packages. aws-sdk-swift alone consumed 225.72 seconds before project compilation began. The complete focused command took 420.33 seconds.

Required outcome

  • Validate the shared repository cache before a timed build/test starts.
  • Repair or quarantine a cache with missing lock/metadata deterministically.
  • Reuse one immutable dependency checkout across linked worktrees when the package fingerprint matches.
  • Retain timing and cache-hit evidence in the recoverable build trace.

Parent programme: stephenlclarke/container-compose#324.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions