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

[6.3.0] Track dev/non-dev use_extension calls #18918

Merged
merged 2 commits into from
Jul 12, 2023

Commits on Jul 12, 2023

  1. Track dev/non-dev use_extension calls

    By always tracking whether a given extension usage by a module has `use_extension` calls with and/or without `dev_dependency = True` instead of just for isolated extension usages, we obtain the following advantages:
    
    * Module extensions can use `module_ctx.is_dev_dependency` to learn whether the root module contains only `use_extension` calls with `dev_dependency = True` for them. This is necessary to decide whether repositories that do not directly correspond to tags (e.g. hub repos) should be marked as dev or non-dev dependencies in `module_ctx.extension_metadata`.
    * `ModuleExtensionMetadata` consistency checks of the type "no dev/non-dev imports without dev/non-dev usage" are generalized from isolated to all extensions.
    * Prepares for the removal of `isDevUsage` from `IsolationKey` in a follow-up change which will instead use the exported name of the (only) usage proxy of an isolated usage as the key.
    
    Closes bazelbuild#18829.
    
    PiperOrigin-RevId: 547517851
    Change-Id: I1290e53adf735a16d62e2c103f3776ecbd5b1a18
    fmeum authored and iancha1992 committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    9c03c2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c1b6cf View commit details
    Browse the repository at this point in the history