Skip to content

fix(core): pin @effect/platform-node-shared so the SDK installs one Effect - #67251

Merged
rekram1-node merged 1 commit into
devfrom
sdk-effect-dedupe
Nov 30, 2026
Merged

rekram1-node merged 1 commit into
devfrom
sdk-effect-dedupe

Conversation

@rekram1-node

Copy link
Copy Markdown
Member

Fixes the unit (linux) failure on dev and on open PRs: packages/sdk's verify:package fails with "Packed SDK consumer resolved multiple Effect runtimes".

Cause

Effect 4.1.7 was published on Nov 27, and a range in one dependency's own manifest picks it up:

@opencode/core → @effect/[email protected]            (pinned)
                   → @effect/platform-node-shared@^4.1.0  (a range in its manifest, so npm picks 4.1.7)
                        → peer effect@^4.1.7              (hoists effect 4.1.7 to the top level)
@opencode/*    → [email protected]                           (pinned; conflicts, so npm nests a copy in each package)

That leaves 12 copies of Effect in a fresh npm install @opencode/sdk, not just in CI.

Fix

@opencode/core now pins @effect/platform-node-shared (catalog:, 4.1.0) next to the @effect/platform-node it already pins. npm places that 4.1.0 at the top level first, and it satisfies platform-node's ^4.1.0, so 4.1.7 is never fetched.

This keeps the repo's exact-pin policy. It does nothing about the next Effect patch release, though: a pinned package whose manifest uses a range can pull in a newer peer the same way. The longer-term fix is to bump the whole effect/@effect/* catalog together, which is a separate change.

Verification

  • On dev without this change, bun run verify:package in packages/sdk fails, with effect 4.1.7 at the top level and 4.1.0 nested in 11 @opencode/* packages.
  • With it, the check passes ("packed SDK consumer OK"), with a single [email protected], and the Node, Bun, workerd and wrangler dry-run steps all succeed.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fix works and is sound. On the base, bun run verify:package in packages/sdk fails with "Packed SDK consumer resolved multiple Effect runtimes" (12 copies of effect). With this change it passes ("packed SDK consumer OK"), including the wrangler dry-run. Pinning @effect/platform-node-shared next to @effect/platform-node matches what packages/server and packages/util already do, and the lockfile change is the single matching line.

Public API: unchanged. @opencode/core gains one pinned runtime dependency at the version consumers already resolve.

No concerns.

@rekram1-node
rekram1-node merged commit 8a94973 into dev Nov 30, 2026
11 checks passed
@rekram1-node
rekram1-node deleted the sdk-effect-dedupe branch November 30, 2026 04:55
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