Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Tracking issue for stable -C emit-artifact-notifications rustc flag #60419

Closed

Description

@alexcrichton

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

Activity

  1. added
    T-compiler
    B-unstable
    C-tracking-issue
    on Apr 30, 2019
  2. ehuss commented on Apr 30, 2019

    @ehuss
    Contributor
    * 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.

  3. added
    A-diagnostics
    on Apr 30, 2019
  4. changed the title [-]Tracking issue for `-Z emit-directives`[/-] [+]Tracking issue for `-Z emit-artifact-notification`[/+] on May 20, 2019
  5. changed the title [-]Tracking issue for `-Z emit-artifact-notification`[/-] [+]Tracking issue for `-Z emit-artifact-notifications`[/+] on May 20, 2019
  6. alexcrichton commented on Jun 14, 2019

    @alexcrichton
    MemberAuthor

    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?

  7. cramertj commented on Jun 14, 2019

    @cramertj
    Member

    @rfcbot fcp merge

    See above comment for summary. @alexcrichton could you also provide a link to the tests for this feature?

  8. rfcbot commented on Jun 14, 2019

    @rfcbot

    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.

  9. added
    proposed-final-comment-period
    disposition-merge
    on Jun 14, 2019
  10. eddyb commented on Jun 14, 2019

    @eddyb
    Contributor

    We could also enable this by default in JSON mode without a flag, to stabilize it.

  11. 11 remaining items

  12. changed the title [-]Tracking issue for `-Z emit-artifact-notifications`[/-] [+]Tracking issue for stable `emit-artifact-notifications` rustc flag[/+] on Jul 12, 2019
  13. 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
  14. alexcrichton commented on Jul 17, 2019

    @alexcrichton
    MemberAuthor

    While we're waiting for FCP to finish, I've proposed an implementation of this stabilization at #62766

  15. added
    finished-final-comment-period
    and removed
    final-comment-period
    on Jul 21, 2019
  16. rfcbot commented on Jul 21, 2019

    @rfcbot

    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.

  17. added a commit that references this issue on Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsB-unstableC-tracking-issueT-compilerdisposition-mergefinished-final-comment-period

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions