Skip to content

Run Package.resolved update on the production toolchain#1242

Merged
kishikawakatsumi merged 1 commit into
masterfrom
fix/spm-update-use-production-toolchain
Jun 23, 2026
Merged

Run Package.resolved update on the production toolchain#1242
kishikawakatsumi merged 1 commit into
masterfrom
fix/spm-update-use-production-toolchain

Conversation

@kishikawakatsumi

Copy link
Copy Markdown
Member

Problem

The weekly Update Package.resolved workflow (spm.yml) has been failing every run since early May 2026 (e.g. run 27925733603, 27520002020). The Build step dies with:

.build/checkouts/swift-configuration/Sources/Configuration/Providers/Files/FileProvider.swift:189:37:
error: value of type 'Data' has no member 'bytes'

so it never reaches Create Pull Request — dependency-update PRs have not been opened for ~7 weeks.

Root cause

  • swift-configuration is an indirect dependency: vaporasync-http-clientapple/swift-configuration. async-http-client added this dependency in 1.31.0.
  • The scheduled job runs swift package update, which resolves swift-configuration to 1.2.0. That version uses Data.bytes in FileProvider.swift.
  • The job installs the macOS Swift.org toolchain via SwiftyLab/setup-swift@latest (currently swift-6.3.2-RELEASE), whose bundled Foundation does not expose Data.bytes → compile error.
  • This is environment-specific. The app ships on swift:6.3-jammy (see Dockerfile), and the Test workflow builds green there, so the resolved graph is fine for production — only the floating macOS Swift.org toolchain trips on it.

Fix

Run the resolve/build inside the same swift:6.3-jammy image the app deploys on, so Package.resolved is validated against the real production toolchain instead of a floating macOS toolchain with a different Foundation. PR creation and automerge stay on the host runner where the gh CLI is available.

🤖 Generated with Claude Code

The weekly "Update Package.resolved" job installed the macOS Swift.org
toolchain via SwiftyLab/setup-swift@latest (currently swift-6.3.2-RELEASE).
Its bundled Foundation lacks `Data.bytes`, which swift-configuration 1.2.0
(pulled transitively through vapor -> async-http-client >= 1.31.0) uses in
FileProvider.swift. `swift package update && swift build` therefore failed
with "value of type 'Data' has no member 'bytes'", so no update PR was ever
created (failing every week since early May 2026).

The app ships on swift:6.3-jammy (see Dockerfile) and the Test workflow
builds green there, so the resolution is fine for production. Run the
resolve/build inside that same image so Package.resolved is validated
against the toolchain we actually deploy, instead of a floating macOS
toolchain with a different Foundation. PR creation and automerge stay on the
host runner where the gh CLI is available.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 23, 2026 02:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kishikawakatsumi kishikawakatsumi merged commit 376d6c3 into master Jun 23, 2026
1 check passed
@kishikawakatsumi kishikawakatsumi deleted the fix/spm-update-use-production-toolchain branch June 23, 2026 13:18
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.

2 participants