From d8cf864b087c5b959de91216b62917fd158317a2 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 30 Jun 2016 13:13:28 +0000 Subject: The message "currently loading: " is often stuck on the first loaded package. Also, the number of pending items seems to 'leak' and always increase. Be sure to add each package only once, even if the computation has to be restarted. RELNOTES: The progress message would not clear packages that need to be loaded twice. -- MOS_MIGRATED_REVID=126295556 --- .../google/devtools/build/lib/skyframe/PackageProgressReceiver.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PackageProgressReceiver.java') diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageProgressReceiver.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageProgressReceiver.java index 4faf952dd9..3a394d0cd9 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageProgressReceiver.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageProgressReceiver.java @@ -23,7 +23,7 @@ import java.util.Deque; /** * A class that, when beeing told about start and end of a package * being loaded, keeps track of the loading progress and provides it - * as a human-readable string intened for the progress bar. + * as a human-readable string intended for the progress bar. */ public class PackageProgressReceiver { @@ -34,7 +34,9 @@ public class PackageProgressReceiver { * Register that loading a package has started. */ public synchronized void startReadPackage(PackageIdentifier packageId) { - pending.addLast(packageId); + if (!pending.contains(packageId)) { + pending.addLast(packageId); + } } /** -- cgit v1.2.3