Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement future incompatibility report support #8825

Merged
merged 4 commits into from
Mar 5, 2021

Commits on Mar 4, 2021

  1. Implement future incompatibility report support

    cc rust-lang/rust#71249
    
    This implements the Cargo side of 'Cargo report future-incompat'
    
    Based on feedback from alexcrichton and est31, I'm implemented this a
    flag `--future-compat-report` on `cargo check/build/rustc`, rather than
    a separate `cargo describe-future-incompatibilities` command. This
    allows us to avoid writing additional information to disk (beyond the
    pre-existing recording of rustc command outputs).
    
    This PR contains:
    
    * Gating of all functionality behind `-Z report-future-incompat`.
      Without this flag, all user output is unchanged.
    * Passing `-Z emit-future-incompat-report` to rustc when
      `-Z report-future-incompat` is enabled
    * Parsing the rustc JSON future incompat report, and displaying it
      it a user-readable format.
    * Emitting a warning at the end of a build if any crates had
      future-incompat reports
    * A `--future-incompat-report` flag, which shows the full report for
      each affected crate.
    * Tests for all of the above.
    
    At the moment, we can use the `array_into_iter` to write a test.
    However, we might eventually get to a point where rustc is not currently
    emitting future-incompat reports for any lints. What would we want the
    cargo tests to do in this situation?
    
    This functionality didn't require any significant internal changes to
    Cargo, with one exception: we now process captured command output for
    all units, not just ones where we want to display warnings. This may
    result in a slightly longer time to run `cargo build/check/rustc` from
    a full cache. since we do slightly more work for each upstream
    dependency. Doing this seems unavoidable with the current architecture,
    since we need to process captured command outputs to detect
    any future-incompat-report messages that were emitted.
    Aaron1011 committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    6177c65 View commit details
    Browse the repository at this point in the history
  2. Address review comments

    Aaron1011 committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    f03d47c View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2021

  1. Configuration menu
    Copy the full SHA
    9ea3503 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    139ed73 View commit details
    Browse the repository at this point in the history