bazelbuild/bazel

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

Open

#27,365 建立於 2025年10月20日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Java (4,465 fork)batch import
P2help wantedteam-ExternalDepstype: bug

倉庫指標

Star
 (25,384 star)
PR 合併指標
 (平均合併 22天 20小時) (30 天內合併 77 個 PR)

描述

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

貢獻者指南