Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Repository not re-evaluated when BUILD file referenced by repository is removed #27537

Open
Labels
@lamcw

Description

@lamcw

Description of the bug:

Bazel does not seem to be re-fetching / re-evaluating repositories if aBUILD.bazel for a label denoting the package boundary is removed while still being referenced by the repository.

See the repro code below for an example.

I expected to see an error like

BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.

but instead the build passes no problem. I am only able to force the error after runningbazel clean --expunge --async.

Which category does this issue belong to?

Core

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

https://github.com/lamcw/bazel-repo-invalidate-repro

Run the following in the above Git repository:

$bazel build @gtest//:readme# builds ok$rm -f third_party/gtest/BUILD.bazel$bazel build @gtest//:readme# should fail, but builds ok

Which operating system are you running Bazel on?

MacOS

What is the output ofbazel info release?

release 8.4.2

Ifbazel info release returnsdevelopment version or(@non-git), tell us how you built Bazel.

No response

What's the output ofgit 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.

I have yet to run a bisect, but this is reproducible on Bazel 7.7.0 and 7.6.2

Have you found anything relevant by searching the web?

No response

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

Inspecting$(bazel info output_base)/java.log, I can see that the Bazel server detects changes in the relevant BUILD.bazel file, but somehow decided not to re-evaluate the repository.

$grep'BUILD.bazel'$(bazel info output_base)/java.log251105 08:39:40.285:I 172 [com.google.devtools.build.lib.skyframe.SkyframeExecutor.logDiffInfo] DiffAwareness found 1 modified source files and directory listings for /Users/thomaslam/work/bazel-repo-invalidate-repro: [/Users/thomaslam/work/bazel-repo-invalidate-repro]/[third_party/gtest/BUILD.bazel]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp