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

Add new feature resolver. #7820

Merged
merged 22 commits into from
Feb 20, 2020
Merged

Add new feature resolver. #7820

merged 22 commits into from
Feb 20, 2020

Commits on Feb 20, 2020

  1. Move rustc target collection out of bcx.

    This allows querying it earlier, and independently of the rest of stuff in BuildContext.
    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    949ecca View commit details
    Browse the repository at this point in the history
  2. Add a RequestedFeatures struct to hold cli features.

    The RequestedFeatures struct holds the features requested on the command
    line.
    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    db80baa View commit details
    Browse the repository at this point in the history
  3. Add new feature resolver.

    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    7caa161 View commit details
    Browse the repository at this point in the history
  4. Ensure dev-dep features are unified if any are used.

    There is a complex issue where `cargo test -Zfeatures=dev_dep` was
    building things incorrectly if there was a binary executable. The issue
    is that lib.rs needed to be built twice (once linked against normal
    dependencies, once against dev dependencies), but the current Unit
    structure can't distinguish between the two, and thus it was picking the
    wrong one.
    
    Instead of allowing `cargo test` to build binaries without
    dev-dependency features, just link main.rs against the
    dev-dependency-unified versions.
    
    We may need to revisit this in the future, but for now it is not clear
    what people want or how this should work. Fixing this would require
    substantial changes to how unit dependencies are computed (to properly
    handle deduplication), so for now we'll use a simpler solution. It would
    also mean `cargo test` would take longer on some projects (because it
    would need to build the library 3 times instead of twice).
    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    d728f38 View commit details
    Browse the repository at this point in the history
  5. Do not store requested_features in FeatureResolver.

    This isn't really needed "globally", just at the beginning.
    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    a2135fe View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3f06823 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2c8b9fb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    76f0d68 View commit details
    Browse the repository at this point in the history
  9. Add a cyclical dev-dep test.

    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    899067f View commit details
    Browse the repository at this point in the history
  10. Add -Zfeatures=all option.

    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    da678a7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    134aeff View commit details
    Browse the repository at this point in the history
  12. Rewrite new feature resolver to simplify DepKind handling.

    Now that dev-dependencies are a global setting, only build-dependencies
    matter. This is maybe a little simpler to understand?
    ehuss committed Feb 20, 2020
    Configuration menu
    Copy the full SHA
    6154645 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6f33738 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8973b95 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e0d64f9 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    137642c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b7c0e2e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ffb13a5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    2cec46e View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    df0ae18 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    3d6b5b1 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4d0fda7 View commit details
    Browse the repository at this point in the history