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

Meta rename #5871

Merged
merged 2 commits into from
Aug 7, 2018
Merged

Meta rename #5871

merged 2 commits into from
Aug 7, 2018

Commits on Aug 7, 2018

  1. Configuration menu
    Copy the full SHA
    2db5b45 View commit details
    Browse the repository at this point in the history
  2. Add rename info to Cargo metadata

    Previously, `cargo metadata` exposed dependencies info as a graph of
    package id without any additional information on edges.
    
    However, we do want to add some data to edges, including for example,
    package renames and `cfg` info.
    
    Internally, the edges info is represented as a `Vec<Dependnecy>`. We
    could have exposed that directly, but that risks exposing and
    ossifying an implementation details.
    
    So instead we collapse a `Vec<Dependnecy>` to a single JSON object,
    which at the moment contains `id` and `rename` info only. It should be
    possible to add additional fields to that object backwards compatibly.
    Such representation does not correspond directly to any internal Cargo
    data structure, but hopefully it shouldn't be to hard to maintain.
    
    This representation also does not quite correspond to the "real
    world", where dependencies are between crate (cargo targets), and not
    packages. However, because each dep edge is a JSON object, adding a
    target filter should be possible, which would handle dev-, build-, and
    potential future bin-specific dependencies backwards-compatibly.
    matklad committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    39b1f75 View commit details
    Browse the repository at this point in the history