Skip to content

Incremental correctness issue with local repositories: BUILD file change not noticed #352

@lberki

Description

@lberki

I found it in this build:

$DIR/m/WORKSPACE:

local_repository(name="a", path="$DIR/a")
local_repository(name="b", path="$DIR/b")

$DIR/a/BUILD:

SYNTAX ERROR
genrule(
    name = "gen",
    srcs = [
    "a1.cc",
    "a2.cc",
    ],
    outs = ["a.cc"],
    cmd = "cat $(SRCS) > $@",
)

$DIR/a/WORKSPACE: (empty)
$DIR/b/WORKSPACE(empty)

$DIR/b/BUILD:

cc_library(
    name = "b",
    srcs = ["@a//:a.cc"],
)

Then:

bazel query @a//:all
# Remove SYNTAX ERROR from a/BUILD
bazel query @a//:all

The second query invocation will not notice that a/BUILD changed.

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)type: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions