Repository navigation
TML-3900: When nobody can answer a command's question, the error leads with the question in plain words - #396
Merged
Conversation
…d's question and says in plain words that the user has to choose Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ne question or several, the engine is 0.10.1, and tests cover --yes with several questions Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
commit: |
wmadden-electric
marked this pull request as draft
November 20, 2026 23:29
…lchain and Composer CLI still require 0.10.0; a release is still refused until they match Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…of the refusal and how an engine change merges before the products require it; a test covers which flags the --confirm line names Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
wmadden-electric
marked this pull request as ready for review
November 22, 2026 22:34
wmadden-electric
enabled auto-merge (squash)
November 22, 2026 22:34
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.
A command asks the user to choose what happens to something, and nobody can answer: the run is a script, or
--yeswas passed. The ORM'sprisma migration planis the first such command. A user removes a field, and the plan would drop a column that holds data.Before:
After:
The change
The old first line described the engine's prompt mechanism ("needs a statement", "the session is not interactive") in words a user does not know. The error conventions say the first line of an error says what failed. The command's own question already says that, so it becomes the first line, and the engine's sentence underneath uses plain words.
whyYou have to choose what happens, and this run cannot ask you.--yesYou have to choose what happens, and --yes does not choose for you.2 choices are needed, and this run cannot ask you.Two lines that report a flag which answered nothing are reworded the same way:
--delete Legcy answers no question; the questions are about Legacy, User.nickname.becomes--delete Legcy does not name Legacy or User.nickname.--confirm mydb answers no consent in this run; a statement flag is what answers these questions.becomes--confirm mydb does not choose what happens; --rename or --delete does.What does not change
The error code, the exit code, the next actions and
meta. No type, field or function is added. Scripts that branch on the code or readmetaare unaffected; anything that matched the old summary text needs the new text.Version
@prisma/cli-enginegoes from 0.10.0 to 0.10.1, as the engine version check requires for any change to the engine. Only error text changes, so it is a patch.Conformance
@prisma/orm-toolchainand@prisma/composer-clirequire engine 0.10.0 exactly, so the conformance check reports a mismatch once the engine is 0.10.1. Two exceptions inpackages/cli/scripts/conformance.tsallow that mismatch, and they are limited to thedevchannel. Pull request CI and the development build that every merge publishes pass. Until both products move, a development build installs two engine copies, 0.10.0 for the product commands and 0.10.1 for the shell; they differ only in this error text, and the exceptions allow that finding too. A release of the CLI is still refused until both products require 0.10.1, and the exceptions are removed in the pull request that pins those product releases. This is the route #390 took for engine 0.10.0, with the channel limit added. ADR 0004 now records it, including that the follow-up must pin both products in one pull request, because one that pins only the first passes its checks and is then refused at publish.After this
The ORM asserts the old text in its tests and docs. It takes the new text when it moves to this engine version.
Agent: hammurabi-19