-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-compiletestArea: The compiletest test runnerArea: The compiletest test runnerA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Not surprising (and I don't really consider this a bug necessarily), but something like
$ rustc --error-format=json --emit
error: Argument to option 'emit' missing
Usage:
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
Comma separated list of types of output for the
compiler to emit
doesn't respect --error-format=json
. I think that is entirely reasonable, since --error-format
itself might be missing its value or get passed some invalid value 🤷
Just opening an issue to note this, because the implication for ui tests is that this obviously won't get picked up by compiletest for the //~?
error annotations which are based on JSON diagnostic messages.
For test writers, the implication is simply that you can't use
//@ compile-flags: --emit
//~? ERROR: Argument to option 'emit' missing
and you'll need to use
//@ compile-flags: --emit
//@ error-pattern: Argument to option 'emit' missing
as an fallback.
Metadata
Metadata
Assignees
Labels
A-CLIArea: Command-line interface (CLI) to the compilerArea: Command-line interface (CLI) to the compilerA-compiletestArea: The compiletest test runnerArea: The compiletest test runnerA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.