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

Also emit source information for paths #8988

Closed
wants to merge 2 commits into from

Commits on Dec 17, 2020

  1. Also emit source information for paths

    Previously, the location for path-based (i.e., local) packages was
    redacted from metadata output. This was done way back when so that
    `Cargo.lock` would not include path sources:
    rust-lang#7483 (comment)
    
    This PR makes this redaction optional so that `cargo metadata` and
    friends _will_ output the source location, which is useful for tools
    like `rustfmt` which need to know the paths to local packages (see rust-lang#7483
    and rust-lang/rustfmt#4599).
    
    Interestingly enough, no tests fail even though
    `disable_path_serialization` is never currently called. I don't know if
    that's because there's no test that cover where redaction is needed, or
    because redaction is simply no longer needed (presumably because
    lockfile generation now uses custom logic). If it is the latter, this PR
    can be simplified to not support opting into redaction.
    
    Fixes rust-lang#7483
    Jon Gjengset committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    a1ea74a View commit details
    Browse the repository at this point in the history
  2. Don't warn for disable_path_serialization

    Jon Gjengset committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    ad3cd3a View commit details
    Browse the repository at this point in the history