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 'multidep' (RFC-3176) #10061

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Commits on Mar 16, 2022

  1. Add 'multidep' feature toggle, initial impl of RFC-3176

    This is a squashed commit comprised of the following:
    -----------------------------------------------------
    
    Add metadata test to see how it would respond to multiple names for a crate with the same version
    
    Add all multidep specific artifact tests
    
    They are ignored for now until the actual implementation comes in for
    validation.
    
    Add support for multiple names for the same crate
    
    It's worth mentioning that crates, called packages, are identified
    by their name and their semver version. The resolver handles
    figuring out which versions are allowed, but typically separates
    crates of the same name by breaking semver version. Thus a:0.1 and
    a:0.2 are treated as two different dependencies as far as the code
    is concerned. a:0.1.0 is a package id.
    
    In order to allow multiple names to the same package id code that used
    to be fine with a single id now has to deal with multiple pairs of
    package-id/dependency-name pairs.
    
    The key to understanding why so many functions are affected is
    Resolver::extern_crate_names_and_dep_names() which trickles up
    into unit-dependencies.
    
    Re-activate all tests validating 'multidep' thus far
    
    Remove adjustments to `cargo metadata` test with bindeps
    
    It's there to show what currently happens if there are multideps,
    which basically means these are ignored entirely, showing only
    the first available name of the package.
    
    Fix build errors due to dep-filter signature changes
    Byron committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    a977a5f View commit details
    Browse the repository at this point in the history
  2. a shot at simplifying filtering

    It's really only important when main dependencies are handled, but
    and otherwise is always letting dependencies pass.
    Byron committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    7c17733 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    13f4319 View commit details
    Browse the repository at this point in the history
  4. Roll back workspace_metadata_with_dependencies_no_deps() (rust-lang#1…

    …0407)
    
    That way, we know that the case without non-artifact dependencies keeps
    working, see rust-lang#10407 (comment)
    for the source of the change.
    Byron committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    10ffdd5 View commit details
    Browse the repository at this point in the history
  5. Auto-resolve collisions if using a meta-hash would help

    Collisions in binaries or dylibs are quite easy to get into when
    compiling artifacts deps in conjunction with build overrides.
    
    The latter will cause multiple builds and prevent deduplication,
    while certain platform rules prevent unique filename to be generated
    while dropping files into the same folder.
    
    Now we recomputate outputs after detecting certain avoidable collisions
    to be more usable in this specific situation.
    Byron committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    05a76cb View commit details
    Browse the repository at this point in the history