Skip to content

Fix snapshot builds - #963

Merged
pblazej merged 5 commits into
mainfrom
blaze/fix-snapshot-build
Apr 13, 2026
Merged

Fix snapshot builds#963
pblazej merged 5 commits into
mainfrom
blaze/fix-snapshot-build

Conversation

@pblazej

@pblazej pblazej commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Haven't found a better workaround yet - it's more about testing newer Swift than SPM itself.

@github-actions

github-actions Bot commented Apr 13, 2026

Copy link
Copy Markdown

⚠️ This PR does not contain any files in the .changes directory.

@pblazej pblazej changed the title fix(agent): avoid self access after actor init in @MainActor Session … Fix snapshot builds Apr 13, 2026
Recent main-snapshot toolchains crash at build startup with
"unable to find bundle named SwiftBuild_SWBUniversalPlatform"
(SwiftPM's SwiftBuild integration cannot locate its resource bundles
on the CI image). This prevents the job from ever reaching Swift
compilation.

Pass --build-system native to fall back to the classic SwiftPM build
system, which is sufficient for the workflow's goal of validating the
package against upcoming Swift.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pblazej
pblazej force-pushed the blaze/fix-snapshot-build branch from 16fbd68 to da13344 Compare April 13, 2026 09:18
pblazej and others added 4 commits April 13, 2026 11:20
v4 runs on Node.js 20 which GitHub Actions is deprecating (forced to
Node.js 24 by default on 2026-06-02, removed on 2026-09-16). v5 runs
on Node.js 24.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v3/v4 run on Node.js 20, which GitHub Actions is deprecating
(forced to Node 24 on 2026-06-02, removed on 2026-09-16). v5 ships
on Node 24.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…init

Swift 6.3 (main-snapshot) tightened @mainactor init isolation: once
self is copied into a nonisolated context (e.g. an actor init),
subsequent self.<property> accesses in the same init are rejected
with:

    error: cannot access 'self' here in main actor-isolated initializer
    note: after making a copy of 'self', only main actor-isolated
          properties of 'self' can be accessed from this init

Introduce a local `room` binding so downstream TextMessageSender /
TranscriptionStreamReceiver / observe(room:) calls don't implicitly
read self.room.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v6 is the current stable release (v6.0.2) and runs on Node.js 24.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
senders: [any MessageSender]?,
receivers: [any MessageReceiver]?)
{
let room = options.room

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is required due to hardened self access in MainActor isolated init.

@pblazej

pblazej commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

@pblazej
pblazej marked this pull request as ready for review April 13, 2026 09:50
@pblazej
pblazej requested a review from hiroshihorie April 13, 2026 09:50
@pblazej
pblazej merged commit f5fa80e into main Apr 13, 2026
67 of 71 checks passed
@pblazej
pblazej deleted the blaze/fix-snapshot-build branch April 13, 2026 11:20
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