Repository navigation
Conformance drops the engine 0.7.0 exceptions: the ORM toolchain and Composer both peer engine 0.9.0 - #368
Merged
Conversation
…Composer both peer engine 0.9.0 Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 56 minutes. View limit details
Comment |
commit: |
wmadden
approved these changes
Oct 23, 2026
SevInf
pushed a commit
that referenced
this pull request
Nov 13, 2026
…ts and the shell's paths (#390) ## Intent When someone runs a Prisma 7 command against the Prisma 8 CLI, they should learn in that same run what replaced it and what to run next. Today they get only `No command registered for '<command>'`. This applies to people and to agents trained on Prisma 7. This PR is the first of four. It extends the engine's redirect mechanism, publishes it as `@prisma/[email protected]`, and covers the Prisma 7 commands and flags the shell owns. orm-toolchain and composer-cli add the Prisma 7 paths they own once this engine version is published. A final PR here then pins those releases and adds one test that covers every Prisma 7 path. ## Changes **Engine (`@prisma/cli-engine` 0.9.0 → 0.10.0)** - `RedirectSpec.replacement` may now be one step, an ordered list of steps, or absent. - A redirect may also set: - its own error `code` (default `CLI.COMMAND_MOVED`) - a `summary` (`{bin}` is substituted) - `help`, a command whose `--help` the error points at - `docsUrl`, rendered as an `open-url` next action - Next actions are ordered: steps, then help, then docs. - A redirect that names none of replacement, help, or docsUrl is a construction error. - A redirect that uses only the old fields renders exactly as before; the existing tests pass unchanged. - The minor version moves because the normalized `CommandRedirect.replacement` changed from `string` to `readonly string[]`. **Shell (`packages/cli/src/v7-redirects.ts`)** - A command family with no commands, holding the shell's Prisma 7 redirects: - **Paths, answered with `CLI.V7_COMMAND`:** `bootstrap`, `postgres link`, `platform status`, `version`, `complete`, `debug`, `mcp`. - **`init` flags, answered with `CLI.V7_FLAG`:** `--db`, `--datasource-provider`, `--generator-provider`, `--preview-feature`, `--output`, `--url`, `--with-model`, `--no-skills`. - Each error names the Prisma 8 equivalent as `run-command` next actions, points at its `--help` (or at the CLI docs when there is no equivalent), and says in `why` what the equivalent does not cover. Prisma 7 is mentioned only in the summary. - `CLI.V7_COMMAND` and `CLI.V7_FLAG` are added to `docs/reference/error-reference.md`. **Conformance** - Two temporary exceptions allow `@prisma/orm-toolchain` and `@prisma/composer-cli` to keep peering engine `0.9.0` until they release against `0.10.0`. These are the same kind of entries #368 removed. ``` $ prisma bootstrap ✘ [CLI.V7_COMMAND] `prisma bootstrap` is a Prisma 7 command and is not available in Prisma 8 why: Setting up a new app takes two commands: `project create` creates a Project, ... → Step 1: prisma project create <name> → Step 2: prisma postgres create <name> → Read its help: prisma project create --help ``` ## Scope **Not in this PR:** - The ORM's Prisma 7 paths (`generate`, `db *`, `migrate *`, `studio`, …) belong to orm-toolchain. It already redirects the six `migrate *` paths, and the engine rejects a second family claiming the same path. - `dev ls/rm/start` and the Prisma 7 flags on `dev` belong to composer-cli. - The test that covers every Prisma 7 path comes in a later PR here, after those releases. ## Verification - `pnpm typecheck`, `pnpm lint` and `pnpm --filter @prisma/cli test` pass. The new `packages/cli/tests/v7-redirects.test.ts` has 57 cases. - `pnpm --filter @prisma/cli-engine test`: one failure, `spawn-real-child` ("child runs in the engine's own process group"). It also fails on main on the machine this was developed on. - `pnpm check:conformance` fails locally with `tarball/pack-failed` for `prisma`. The cause is Node's `fs.cpSync` failing with EACCES on the virtiofs mount the checkout sits on, and it reproduces without this branch's changes. The CI run of `check:conformance` is the result to check. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
packages/cli/scripts/conformance.tsno longer allows a product family to peer@prisma/cli-engine0.7.0 while the shell ships 0.9.0. Both exceptions met their own "remove when" condition:@prisma/orm-toolchain8.0.0-rc.20 (pinned since #364) and@prisma/composer-cli0.34.0 (pinned since #366) both peer 0.9.0. With them gone, a family that falls behind the shell's engine fails conformance again instead of passing as an allowed exception.pnpm check:conformancepasses on this branch: 5 subjects checked, nothing to report. Typecheck passes.Agent: rochester-20