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

Let module extensions track calls to Label() #20742

Closed
wants to merge 4 commits into from
Closed

Commits on Jan 4, 2024

  1. Let module extensions track calls to Label()...

    ... that use repo mapping. This is a rather obscure case of the lockfile being stale; if the `Label()` constructor is called in an extension impl function, and that call uses repo mapping of any form (i.e. the argument looks like `@foo//bar`), then we need to be ready to rerun the extension if `@foo` were to suddenly map to something else.
    
    I also did a minor refactoring in `SingleExtensionEvalFunction` around the logic to decide whether the locked extension is up-to-date. Right now we perform a "diff" between the locked extension and what we expect to be up-to-date, and if a "diff" is found *and* `--lockfile_mode=error`, we basically perform a diff again. We also don't short circuit; that is, if the transitive bzl digest has changed, there's no point in seeing whether any files have changed, but we do right now.
    
    A follow-up will be sent to fix the analogous bug for repo rules.
    
    Fixes #20721.
    Wyverald committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    5bfd186 View commit details
    Browse the repository at this point in the history
  2. review comments

    Wyverald committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    64417c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7120675 View commit details
    Browse the repository at this point in the history
  4. more comments

    Wyverald committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    070344b View commit details
    Browse the repository at this point in the history