First you need to run echo "test" > /tmp/foo
.
Running bazel build @repo//...
will print "running repo rule".
Touching test_file
and then bazel build @repo//...
will not do anything; the repo rule is not rerun and the artifacts in @repo
are not rebuilt.
Modifying test_file
will cause the workspace rule to be rerun.
- if you make a change that yields a different BUILD.bazel file then artifacts will be rebuilt (i.e. changing the first line of
test_file
) - if you make a change that still yields the same BUILD.bazel file no actions will be run (i.e adding extra lines, whitespace to
test_file
)