diff options
author | laurentlb <laurentlb@google.com> | 2017-04-13 14:18:20 +0000 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2017-04-13 16:53:06 +0200 |
commit | eecd7128f420b2d404ed2f42d549dea3bd198d9d (patch) | |
tree | a5a6dcfcd53064a189f2808c4d7fd07e5c237807 | |
parent | e565230a98a844b150970ac4a56e648dc4c8398c (diff) |
Update comments and remove obsolete field.
RELNOTES: None.
PiperOrigin-RevId: 153058374
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/Preprocessor.java | 2 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/LabelVisitor.java | 39 |
2 files changed, 2 insertions, 39 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Preprocessor.java b/src/main/java/com/google/devtools/build/lib/packages/Preprocessor.java index c415f79919..193033699b 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Preprocessor.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Preprocessor.java @@ -22,12 +22,10 @@ public interface Preprocessor { /** The result of parsing a preprocessed BUILD file. */ static class AstAfterPreprocessing { public final BuildFileAST ast; - public final boolean containsAstParsingErrors; public final Iterable<Event> allEvents; public AstAfterPreprocessing(BuildFileAST ast, StoredEventHandler astParsingEventHandler) { this.ast = ast; - this.containsAstParsingErrors = astParsingEventHandler.hasErrors(); this.allEvents = astParsingEventHandler.getEvents(); } } diff --git a/src/main/java/com/google/devtools/build/lib/query2/LabelVisitor.java b/src/main/java/com/google/devtools/build/lib/query2/LabelVisitor.java index 80785ca0ca..aadd1a766c 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/LabelVisitor.java +++ b/src/main/java/com/google/devtools/build/lib/query2/LabelVisitor.java @@ -85,7 +85,6 @@ final class LabelVisitor { private class VisitationAttributes { private Collection<Target> targetsToVisit; private boolean success = false; - private boolean visitSubincludes = true; private int maxDepth = 0; /** @@ -93,8 +92,7 @@ final class LabelVisitor { */ boolean current() { return targetsToVisit.equals(lastVisitation.targetsToVisit) - && maxDepth <= lastVisitation.maxDepth - && visitSubincludes == lastVisitation.visitSubincludes; + && maxDepth <= lastVisitation.maxDepth; } } @@ -139,10 +137,7 @@ final class LabelVisitor { * terminate prematurely. * * The interruption of the loading of an individual package can happen in two - * different ways depending on whether Python preprocessing is in effect or - * not. - * - * If there is no Python preprocessing: + * different ways. * * 1. We periodically check the interruption state of the thread in * UnixGlob.reallyGlob(). If it is interrupted, an InterruptedException is @@ -152,36 +147,6 @@ final class LabelVisitor { * responsible for package loading. This either means that the worker thread * terminates or that the label parsing terminates if the package that is * being loaded was specified on the command line. - * - * If there is Python preprocessing, events are a bit more complicated. In - * this case, the real work happens on the thread the Python preprocessor is - * called from, but in a bit more convoluted way: a new thread is spawned by - * to handle the input from the Python process and - * the output to the Python process is handled on the main thread. The reading - * thread parses requests from the preprocessor, and passes them using a queue - * to the writing thread (that is, the main thread), so that we can do the - * work there. This is important because this way, we don't have any work that - * we need to interrupt in a thread that is not spawned by us. So: - * - * 1. The interrupted state of the main thread is set. - * - * 2. This results in an InterruptedException during the execution of the task - * in PythonStdinInputStream.getNextMessage(). - * - * 3. We exit from RequestParser.Request.run() prematurely, set a flag to - * signal that we were interrupted, and throw an InterruptedIOException. - * - * 4. The Python child process and reading thread are terminated. - * - * 5. Based on the flag we set in step 3, we realize that the termination was - * due to an interruption, and an InterruptedException is thrown. This can - * either raise an AbnormalTerminationException, or make Command.execute() - * return normally, so we check for both cases. - * - * 6. This InterruptedException causes the loading of the package to terminate - * prematurely. - * - * Life is not simple. */ private final TargetProvider targetProvider; private final DependencyFilter edgeFilter; |