Skip to content

local_repository() pointing into workspace is not invalidated when external repo file checking is disabled. #27365

@hanwen-flow

Description

@hanwen-flow

Description of the bug:

Hi!

I noticed that our warm Bazel implementation started complaining about inconsistent file sizes in @@+local_repository+blah//, when someone edited //third_party/blah/BUILD. It turns out that this repo was configured as

local_repository(
    name = "blah",
    path = "third_party/blah",
)

We are running with --watchfs --experimental_check_external_repository_files=false.

I am 99% sure that this problem is caused by --noexperimental_check_output_files not specially treating external repositories that point back into the source tree.

My gut feeling is that making this work will be hard, and I wonder if we could instead forbid this?

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?


If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)help wantedSomeone outside the Bazel team could own thisteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions