Skip to content

Upgrade to Alchemy beta 84: a Composer app installs 473 MB instead of 1.6 GB - #402

Merged
wmadden merged 4 commits into
mainfrom
claude/alchemy-footprint-composer-707907
Nov 2, 2026
Merged

wmadden merged 4 commits into
mainfrom
claude/alchemy-footprint-composer-707907

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

A new Composer app now installs about a third of what it did:

npm install of 0.36.0 This branch
@prisma/composer + @prisma/composer-cli 1.4 GB 112 MB
the above + @prisma/composer-prisma-cloud 1.6 GB 473 MB

What changed

Alchemy 2.0.0-beta.84 moved each cloud provider out of the alchemy package into its own package. alchemy itself went from 143 MB to 6 MB, because it no longer carries AWS, GCP, Cloudflare and the rest. Composer upgrades to it:

// before
import * as Prisma from 'alchemy/Prisma';
// after
import * as Prisma from '@alchemy.run/prisma';
  • Alchemy 2.0.0-beta.83 → beta.84. The Prisma provider now comes from @alchemy.run/prisma, in lockstep with alchemy. Only @prisma/composer-prisma-cloud and the Prisma Cloud packages it bundles depend on it. @prisma/composer and @prisma/composer-cli depend on alchemy alone. The resource type IDs (Prisma.*) did not change, so existing deploy state carries over.
  • effect and its companions 4.0.3 → 4.0.5. Beta 84 requires ^4.0.5 and was built on 4.0.5. @distilled.cloud/prisma moves to rc.17, the exact version the provider uses, so npm installs one copy.
  • Dropped three pins from @prisma/composer: @effect/sql-d1, @effect/sql-sqlite-do and @effect/vitest. Composer pinned them because beta 83 depended on the two SQL packages; beta 84 no longer does, and @effect/vitest is an optional peer that only alchemy/Test/Vitest loads. Nothing in Composer or Alchemy loads any of them at runtime. Dropping @effect/vitest also removes vitest and vite from every install.
  • New regression checks. check:npm-effect-resolution now fails if an install contains vite, vitest or @effect/vitest; if the Prisma provider is installed without the Prisma Cloud package; or if there is more than one @distilled.cloud/prisma. It also fails if importing the Prisma provider adds a process signal listener. I confirmed the footprint check fails when the @effect/vitest pin is put back. check:family-static-graph now also forbids static @alchemy.run/* imports from the CLI's start-up graph.
  • Docs. ADR-0048 gets a dated amendment note (the decision is unchanged; only where the provider lives). The Prisma Cloud design docs name @alchemy.run/prisma. skills-contrib/upgrade-alchemy-effect now states one pin rule: pin exactly every effect-family package a consumer's install will contain, and nothing else.

What is still large

  • @distilled.cloud/aws (143 MB). @alchemy.run/prisma depends on it only for its S3 bucket bindings, which Composer never calls. Composer cannot remove it for users, because npm overrides only work in the user's own app. A small Prisma Cloud bucket client is being prepared for Alchemy upstream; with it, an app would install about 330 MB.
  • A second @prisma/dev (about 25 MB): the provider wants ^0.20.0, Composer ^0.25.2. Same as on beta 83.
  • @prisma/composer-prisma-cloud itself is 45 MB, mostly source maps and a 24 MB auth/testing bundle. That is Composer's own packaging.

All three are recorded in .drive/deferred.md.

Verification

  • pnpm typecheck: 80 of 80 tasks pass.
  • Unit tests of the packages that use Alchemy (lowering, prisma-cloud, local-target, core, cli, composer-cli): 1,561 pass, 0 fail.
  • check:npm-effect-resolution and check:family-static-graph pass.
  • Importing alchemy and @alchemy.run/prisma registers no SIGINT or SIGTERM listeners.
  • Not run locally: a real deploy. Beta 84 reworks Alchemy's plan and apply engine, which typecheck and unit tests cannot cover. The end-to-end deploy jobs in CI are the real test, including an upgrade deploy over state written by 0.36.0.

Alternatives considered

  • Pinning the dropped packages anyway, to guard against a floating range. Rejected: npm does not install an optional peer that nothing asks for, so a pin is the only thing that would put them in the tree.
  • Working around @distilled.cloud/aws in Composer. Not possible from a library; the fix belongs in the provider.

Agent: saruman-67

🤖 Generated with Claude Code

wmadden-electric and others added 3 commits October 30, 2026 12:37
Alchemy beta 84 moved each provider into its own package. Composer now
imports the Prisma provider from @alchemy.run/prisma instead of
alchemy/Prisma. A Composer app installs 512 MB instead of 1.6 GB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
… docs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…ner checks

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@prisma-gizmo

prisma-gizmo Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Gizmo reviewed c6d5c4c — posted 0 inline comment(s) this pass.

Open findings: none

Change walkthrough

This PR upgrades Composer from Alchemy 2.0.0-beta.83 to beta.84, which split each cloud provider out of the alchemy package into its own scoped package — the Prisma provider now comes from @alchemy.run/prisma, cutting a new app's install from ~1.6 GB to ~473 MB with Prisma Cloud (and 1.4 GB → 112 MB without).

Dependency surface. alchemy and @alchemy.run/prisma are pinned to exactly 2.0.0-beta.84 (the provider is versioned in lockstep), and effect and companions move to exactly 4.0.5, the version beta 84 was built on. Only @prisma/composer-prisma-cloud (and the Prisma Cloud packages it bundles) depend on @alchemy.run/prisma; @prisma/composer and @prisma/composer-cli depend on alchemy alone. Three pins (@effect/sql-d1, @effect/sql-sqlite-do, @effect/vitest) are dropped from @prisma/composer — beta 84 no longer depends on the SQL packages, and the optional vitest peer is only loaded by alchemy/Test/Vitest, so nothing in the tree asks for them. This also removes vitest/vite from user installs. @distilled.cloud/prisma is pinned to the exact rc the provider uses so npm installs one copy. Resource type IDs are unchanged, so existing deploy state carries over.

Source changes. All imports move from alchemy/Prisma to @alchemy.run/prisma across lowering, local-target, target and shared-module code, with tests stubbing the new module path. The beta 84 plan/apply rework is the main untested surface — the PR flags that no real deploy (including an upgrade deploy over 0.36.0 state) was run locally; CI's end-to-end jobs are the actual coverage.

Guardrails. check:npm-effect-resolution now fails on vite/vitest/@effect/vitest in an install, on the Prisma provider being installed without the Prisma Cloud package, on duplicate @distilled.cloud/prisma, and on signal listeners registered by importing the provider; check:family-static-graph forbids static @alchemy.run/* imports from the CLI start-up graph. Docs follow: ADR-0048 gets a dated amendment (provider location only), the Prisma Cloud design docs use the new package name, and skills-contrib/upgrade-alchemy-effect records the one-pin rule.

Merge with main. The head also merges main's module-input work; in every file touched by both changes (package.jsons, local-target compute and tests, descriptors, skills, ADR index, deferred items), the beta.84/4.0.5 bumps and renamed imports sit alongside main's config-pool and dotenv additions. Remaining size caveats (@distilled.cloud/aws, a second @prisma/dev, the composer-prisma-cloud bundle) are recorded in .drive/deferred.md.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 87a16132-d0a5-47b2-9bec-8f125fea52c2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pkg-pr-new

pkg-pr-new Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@402
npm i https://pkg.pr.new/@prisma/composer-cli@402
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@402

commit: c6d5c4c

@prisma-gizmo prisma-gizmo Bot 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.

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot 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.

No Gizmo finding is open and the head commit has been reviewed. Approving.

…int-composer-707907

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

# Conflicts:
#	.drive/deferred.md
#	docs/design/90-decisions/README.md
#	packages/1-prisma-cloud/0-lowering/local-target/src/compute.ts
#	packages/9-public/composer/package.json
#	pnpm-lock.yaml
#	test/integration/package.json

@prisma-gizmo prisma-gizmo Bot 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.

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot 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.

No Gizmo finding is open and the head commit has been reviewed. Approving.

@wmadden
wmadden merged commit f19abf3 into main Nov 2, 2026
25 checks passed
@wmadden
wmadden deleted the claude/alchemy-footprint-composer-707907 branch November 2, 2026 15:30
wmadden-electric added a commit that referenced this pull request Nov 5, 2026
…anch

Keep our catalog pins (alchemy and @alchemy.run/prisma 2.0.0-beta.85, @distilled.cloud/prisma 1.0.0-rc.18, effect 4.1.0) and scratch-stack test imports. Take #402's footprint check (no @effect/vitest, vitest or vite; no @alchemy.run/prisma without the Prisma Cloud package), its process-listener check on the provider import, its ADR-0048 amendment and its effect-family pin rule in the upgrade skill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
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