diff options
author | Francois-Rene Rideau <tunes@google.com> | 2015-09-04 19:13:47 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-09-08 09:02:28 +0000 |
commit | 5a94e59f02833f9142bad9203acd72626b089535 (patch) | |
tree | ddfe00a54a701eff0f74af6e84e5b8cefcef1c93 /src/test/java/com/google/devtools/build/lib/events | |
parent | ab1711b026f8a4915ee2ef2556b2a7dbff18fa63 (diff) |
Refactor Skylark Environment-s
Make Environment-s freezable: Introduce a class Mutability
as a revokable capability to mutate objects in an Environment.
For now, only Environment-s carry this capability.
Make sure that every Mutability is revoked in the same function that creates it,
so no Environment is left open for modification after being created and exported;
exceptions for tests, the shell and initialization contexts.
Unify Environment, SkylarkEnvironment and EvaluationContext into Environment.
Have a notion of Frame for the bindings + parent + mutability.
Replace the updateAndPropagate mechanism by a dynamicFrame.
Simplify ValidationEnvironment, that is now always deduced from the Environment.
--
MOS_MIGRATED_REVID=102363438
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/events')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/events/util/EventCollectionApparatus.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/events/util/EventCollectionApparatus.java b/src/test/java/com/google/devtools/build/lib/events/util/EventCollectionApparatus.java index aa8d8f83a6..c7f85d6fcb 100644 --- a/src/test/java/com/google/devtools/build/lib/events/util/EventCollectionApparatus.java +++ b/src/test/java/com/google/devtools/build/lib/events/util/EventCollectionApparatus.java @@ -18,7 +18,7 @@ import com.google.devtools.build.lib.events.EventCollector; import com.google.devtools.build.lib.events.EventKind; import com.google.devtools.build.lib.events.PrintingEventHandler; import com.google.devtools.build.lib.events.Reporter; -import com.google.devtools.build.lib.syntax.EvaluationContext; +import com.google.devtools.build.lib.syntax.Environment; import com.google.devtools.build.lib.testutil.MoreAsserts; import com.google.devtools.build.lib.util.io.OutErr; @@ -67,9 +67,9 @@ public class EventCollectionApparatus { */ public void setFailFast(boolean failFast) { if (failFast) { - reporter.addHandler(EvaluationContext.FAIL_FAST_HANDLER); + reporter.addHandler(Environment.FAIL_FAST_HANDLER); } else { - reporter.removeHandler(EvaluationContext.FAIL_FAST_HANDLER); + reporter.removeHandler(Environment.FAIL_FAST_HANDLER); } } |