diff options
author | 2016-10-11 22:06:40 +0000 | |
---|---|---|
committer | 2016-10-12 08:56:52 +0000 | |
commit | 79eb4094537d369b22ac72cab4f08a3c1a5f650e (patch) | |
tree | 3f5e5a73cd2661a82b5bb0cfaa35fd723c4f8baf /src/test | |
parent | a629005a0f7b5c702067b2f47e048f11700a5092 (diff) |
When requesting all transitive traversal values recursively, request packages/targets in parallel with subdirectories.
The previous implementation was vulnerable to incomplete traversal in case of cycles: if a subdirectory had a cycle, the targets in the package would never be requested. Requesting the package first would create a different problem, where the subdirectories would never be requested if the package depended on a cycle.
Also stop uniquifying Skylark import cycles when inlining. While uniquification is nice, this was leading to us emitting an error during queries that we weren't actually emitting when not inlining. Putting the cycle into the exception error message should be enough information, and since we emit an error per exception anyway, the number of events will still be lower (although each event might be more verbose).
--
MOS_MIGRATED_REVID=135846847
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java index dc08c01695..f8c326fa99 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java @@ -1116,12 +1116,11 @@ public class SkylarkIntegrationTest extends BuildViewTestCase { } catch (BuildFileContainsErrorsException e) { // This is expected } - assertContainsEvent("cycle in referenced extension files"); assertContainsEvent("test/skylark:ext1.bzl"); assertContainsEvent("test/skylark:ext2.bzl"); assertContainsEvent("Skylark import cycle"); assertContainsEvent("Loading of target '//test/skylark:rule' failed; build aborted"); - assertThat(eventCollector).hasSize(2); + assertThat(eventCollector).hasSize(1); } } } |