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

Introduce max_compatibility_level for bazel_dep #18178

Merged
merged 2 commits into from
Apr 21, 2023

Commits on Apr 21, 2023

  1. Add InterimModule to represent a Module before resolution finishes

    The class Module currently holds data that's no longer needed after resolution finishes (such as the compatibility level, bazel compatibility, the registry where it comes from, etc). Conversely, the repo spec field is not computed until the end of resolution.
    
    To remove runtime checks and reduce cognitive overhead, this CL splits the Module class into two; one only used after resolution finishes (Module), and one only used before (InterimModule). This allows us to introduce max_compatibility_level in a follow CL.
    
    Work towards #17378
    
    Co-authored-by: Brentley Jones <github@brentleyjones.com>
    PiperOrigin-RevId: 525780111
    Change-Id: I2df8d78d324b3c8744ba0a4eda405d162e9bbb8c
    Wyverald and brentleyjones committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    74d7243 View commit details
    Browse the repository at this point in the history
  2. Selection with max_compatibility_level

    See code comments for more details. tl;dr: we use the new `bazel_dep(max_compatibility_level=)` attribute to influence version selection.
    
    Fixes #17378
    
    RELNOTES: Added a new `max_compatibility_level` attribute to the `bazel_dep` directive, which allows version selection to upgrade a dependency up to the specified compatibility level.
    
    Co-authored-by: Brentley Jones <github@brentleyjones.com>
    PiperOrigin-RevId: 526118928
    Change-Id: I332eb3761e0dee0cb7f318cb5d8d1780fca91be8
    Wyverald and brentleyjones committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    4c083ea View commit details
    Browse the repository at this point in the history