You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking issue for stable -C emit-artifact-notifications rustc flag #60419
A-diagnosticsArea: Messages for errors, warnings, and lintsB-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.
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?
* how Cargo will handle its own `--message-format short`
I'm working on diagnostic caching and have the same problem with the short format. I'm wondering if maybe another flag could be added to make rustc include the rendered short form as well as the human form? It seems a little clunky, so I'm not sure if this is going in the wrong direction. The only other option I can think of is to update the JSON format to have full fidelity so that any form can be generated from the base JSON structure. And then have some crate which can take that format and generate the output in any form (colored, human, short, json, etc.). I think there is a diagnostics wg that is maybe looking at moving things into different crates, though I don't really know what their plans are or what the timeframes are.
I'd like to propose FCP for this issue for stabilization. A summary of this feature to stabilize would be:
A new flag, -C emit-artifact-notifications is added to the compiler
When the compiler is otherwise in JSON printing mode, this causes the compiler to print a JSON blob per artifact that it produces.
JSON blobs have the form {"artifact":"path/to/the/artifact.rlib","emit":"link"}. The "artifact" key is the path to the file that is produced, and the "emit" key matches the --emit flag in the compiler. It's, for example, metadata for rmeta files, link for linked artifacts, etc.
There's only one other unresolved question with --error-format=short and how Cargo handles this, but I think that's best left to a different issue.
cc @rust-lang/compiler, could I poke one of y'all to propose stabilization of this feature?
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
changed the title [-]Tracking issue for `-Z emit-artifact-notifications`[/-][+]Tracking issue for stable `emit-artifact-notifications` rustc flag[/+]on Jul 12, 2019
changed the title [-]Tracking issue for stable `emit-artifact-notifications` rustc flag[/-][+]Tracking issue for stable `-C emit-artifact-notifications` rustc flag[/+]on Jul 12, 2019
A-diagnosticsArea: Messages for errors, warnings, and lintsB-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.
Activity
ehuss commentedon Apr 30, 2019
I'm working on diagnostic caching and have the same problem with the
shortformat. I'm wondering if maybe another flag could be added to make rustc include the renderedshortform as well as thehumanform? It seems a little clunky, so I'm not sure if this is going in the wrong direction. The only other option I can think of is to update the JSON format to have full fidelity so that any form can be generated from the base JSON structure. And then have some crate which can take that format and generate the output in any form (colored, human, short, json, etc.). I think there is a diagnostics wg that is maybe looking at moving things into different crates, though I don't really know what their plans are or what the timeframes are.[-]Tracking issue for `-Z emit-directives`[/-][+]Tracking issue for `-Z emit-artifact-notification`[/+][-]Tracking issue for `-Z emit-artifact-notification`[/-][+]Tracking issue for `-Z emit-artifact-notifications`[/+]alexcrichton commentedon Jun 14, 2019
I'd like to propose FCP for this issue for stabilization. A summary of this feature to stabilize would be:
-C emit-artifact-notificationsis added to the compiler{"artifact":"path/to/the/artifact.rlib","emit":"link"}. The"artifact"key is the path to the file that is produced, and the"emit"key matches the--emitflag in the compiler. It's, for example,metadataforrmetafiles,linkfor linked artifacts, etc.There's only one other unresolved question with
--error-format=shortand how Cargo handles this, but I think that's best left to a different issue.cc @rust-lang/compiler, could I poke one of y'all to propose stabilization of this feature?
cramertj commentedon Jun 14, 2019
@rfcbot fcp merge
See above comment for summary. @alexcrichton could you also provide a link to the tests for this feature?
rfcbot commentedon Jun 14, 2019
Team member @cramertj has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
eddyb commentedon Jun 14, 2019
We could also enable this by default in JSON mode without a flag, to stabilize it.
11 remaining items
[-]Tracking issue for `-Z emit-artifact-notifications`[/-][+]Tracking issue for stable `emit-artifact-notifications` rustc flag[/+][-]Tracking issue for stable `emit-artifact-notifications` rustc flag[/-][+]Tracking issue for stable `-C emit-artifact-notifications` rustc flag[/+]alexcrichton commentedon Jul 17, 2019
While we're waiting for FCP to finish, I've proposed an implementation of this stabilization at #62766
rfcbot commentedon Jul 21, 2019
The final comment period, with a disposition to merge, as per the review above, is now complete.
As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.
The RFC will be merged soon.
Auto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, …