From 79eb4094537d369b22ac72cab4f08a3c1a5f650e Mon Sep 17 00:00:00 2001 From: Janak Ramakrishnan Date: Tue, 11 Oct 2016 22:06:40 +0000 Subject: 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 --- .../com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/test') 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); } } } -- cgit v1.2.3