diff options
author | Nathan Harmata <nharmata@google.com> | 2017-02-08 18:21:11 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2017-02-09 15:09:37 +0000 |
commit | e16c564b9d9cd4ee983ca7ae580000111fd12dda (patch) | |
tree | 9dae21422b72d4a22c19df0d36d3047bb79513f7 /src/test/shell/integration/loading_phase_tests.sh | |
parent | 26f858c9cda88c45da98f8df2090417042bac2f3 (diff) |
Introduce a new SkyValue that merely contains the workspace name. The workspace name is needed for package loading, and so splitting out this computation into a separate skyframe node that can be change-pruned gives us better incrementality; previously we'd need to reload all packages on a WORKSPACE file change.
N.B.
(i) This CL doesn't solve all the other performance issues with //external in Bazel/Blaze since it's still inefficiently used for resolving labels like @foo//bar:baz.
(ii) This CL doesn't address the wasteful invalidation + change pruning of all the packages.
--
PiperOrigin-RevId: 146925369
MOS_MIGRATED_REVID=146925369
Diffstat (limited to 'src/test/shell/integration/loading_phase_tests.sh')
-rwxr-xr-x | src/test/shell/integration/loading_phase_tests.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/shell/integration/loading_phase_tests.sh b/src/test/shell/integration/loading_phase_tests.sh index cba257afbd..a318c6a20b 100755 --- a/src/test/shell/integration/loading_phase_tests.sh +++ b/src/test/shell/integration/loading_phase_tests.sh @@ -315,4 +315,29 @@ function test_incremental_deleting_package_roots() { expect_not_log "//a:external" } +function test_no_package_loading_on_benign_workspace_file_changes() { + mkdir foo + + echo 'workspace(name="wsname1")' > WORKSPACE + echo 'sh_library(name="shname1")' > foo/BUILD + bazel query //foo:all >& "$TEST_log" || fail "Expected success" + expect_log "//foo:shname1" + + echo 'sh_library(name="shname2")' > foo/BUILD + bazel query //foo:all >& "$TEST_log" || fail "Expected success" + expect_log "Loading package: foo" + expect_log "//foo:shname2" + + echo 'workspace(name="wsname1")' > WORKSPACE + echo '#benign comment' >> WORKSPACE + bazel query //foo:all >& "$TEST_log" || fail "Expected success" + expect_not_log "Loading package: foo" + expect_log "//foo:shname2" + + echo 'workspace(name="wsname2")' > WORKSPACE + bazel query //foo:all >& "$TEST_log" || fail "Expected success" + expect_log "Loading package: foo" + expect_log "//foo:shname2" +} + run_suite "Integration tests of ${PRODUCT_NAME} using loading/analysis phases." |