Closed
Description
First added in #60006 the -Z emit-directives
flag is currently intended to be paired with the --error-format=json
flag. The emit-directives
flag indicates that the compiler will emit a JSON directive for various things it does, currently only for when an rmeta metadata file is produced.
This issue is intended to track stabilizing this flag! The main use case for this is "pipelined compilation" which shows promise for accelerating Cargo's compile of multi-crate graphs.
Current known issues with this flag:
- It's unclear how Cargo will handle its own
--message-format short
flag with this. Cargo will want to switch to-Z emit-directives
by default but--message-format short
in Cargo translates to--error-format short
in rustc, which means Cargo can't simultaneously get a directive JSON plus a short error format - What should the stable form of this flag be called?
- What should the structure of the JSON directive be? Currently it only gives a path to the artifact emitted, but should the
--emit
kind of that artifact also be emitted?
cc @nnethercote
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsBlocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the compiler team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.