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

fix: Don't require default Python version for pip hubs #1344

Merged
merged 1 commit into from
Jul 31, 2023

Commits on Jul 27, 2023

  1. fix: Don't require default Python version for pip hubs

    This fixes the issue where a sub-module was required to always have
    a pip.parse() call configured for the default Python version if they
    used any pip.parse() call. Such a requirement puts sub-modules in an
    impossible situation: If they don't have the default version, they'll
    get an error. If they register the default version, but also register
    a specific version, they'll potentially cause an error if a root module
    changes the default to match their specific version (becaues two
    pip.parse() calls for the same version are made).
    
    The requirement to have the default version registered for a pip hub was
    only present to satisfy the `whl_library_alias` repository rule, which
    needed a Ptyhon version to map `//conditions:default` to.
    
    To fix, the `whl_library_alias` rule's `default_version` arg is made
    optional. When None is passed, the `//condiitions:default` condition
    is replaced with a `no_match_error` setting. This prevents the pip hub
    from being used with the version-unaware rules, but that makes sense: no
    wheels were setup for that version, so it's not like there is something
    that can be used anyways.
    
    Fixes bazelbuild#1320
    rickeylev committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    fe8c1e5 View commit details
    Browse the repository at this point in the history