| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
NotifyingInMemoryGraph in tests.
--
MOS_MIGRATED_REVID=102616906
|
|
|
|
|
|
|
| |
to roll our own for no reason.
--
MOS_MIGRATED_REVID=102597506
|
|
|
|
|
|
|
| |
Improvement for #424.
--
MOS_MIGRATED_REVID=102566748
|
|
|
|
|
|
|
|
|
| |
namespace-runner now have to be explicitly activated via --sandbox_debug.
Fixes #424.
--
MOS_MIGRATED_REVID=102566625
|
|
|
|
|
|
|
| |
tests that can only run under certain operating systems (e.g. Linux sandboxing tests can only run under Linux) into separate suites.
--
MOS_MIGRATED_REVID=102566414
|
|
|
|
|
|
|
| |
parts that can run via remote execution and those that can only run on the local machine (e.g. due to needing extended permissione).
--
MOS_MIGRATED_REVID=102565161
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102565057
|
|
|
|
|
|
|
| |
necessary tools for integration tests.
--
MOS_MIGRATED_REVID=102564985
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks serialization of SkyValues.
--
MOS_MIGRATED_REVID=102457225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102341687
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102341264
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102330569
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102330179
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102276335
|
|
|
|
|
|
|
| |
SkyFunction#compute calls.
--
MOS_MIGRATED_REVID=102268773
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102265945
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102263878
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to curb usage of the create method taking a String for efficiency
reasons. Noticed this method was unused + a few places where we could
easily use chars instead of string. Not a major improvement but removes
some temptation.
RELNOTES:
--
MOS_MIGRATED_REVID=102258319
|
|
|
|
|
|
|
| |
The other constructor is now private.
--
MOS_MIGRATED_REVID=102252544
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102239560
|
|
|
|
|
|
|
| |
stores a striped set of reentrant locks.
--
MOS_MIGRATED_REVID=102198213
|
|
|
|
|
|
|
|
|
|
| |
used in the codebase:
-Add integration with Profiler.
-Add support for merely getting the elapsed time.
--
MOS_MIGRATED_REVID=102165325
|
|
|
|
|
|
|
| |
method wasn't guaranteed to catch all bugs. Also convert to a singleton since there's no reason to have multiple instances.
--
MOS_MIGRATED_REVID=102158719
|
|
|
|
|
|
|
| |
deflaking I just did.
--
MOS_MIGRATED_REVID=102149874
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102145100
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102143368
|
|
|
|
|
|
|
| |
mount the individual files.
--
MOS_MIGRATED_REVID=102142064
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=102139196
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102134151
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102126786
|
|
|
|
|
|
|
|
|
| |
ensuring that the shutdown signaler starts before we do other things.
Also store assertion errors in the unexpected exception variable, as opposed to allowing them to get swallowed. Note that there's still some flakiness, hence the especially verbose error messages.
--
MOS_MIGRATED_REVID=102089689
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces a ThinNodeEntry, which is a NodeEntry without the
means of accessing its value. The InvalidatingNodeVisitor does not
need to access nodes' values while doing its work, so it is provided
with a ThinNodeQueryableGraph, capable of producing only
ThinNodeEntries.
--
MOS_MIGRATED_REVID=102088111
|
|
|
|
|
|
|
|
| |
Move away global constants and global namespaces out of Environment
and into a new file Runtime.
--
MOS_MIGRATED_REVID=101940218
|
|
|
|
|
|
|
|
| |
Allow a call to a struct's field when it's a function.
Check whether a java method exists before issuing KwArg error.
--
MOS_MIGRATED_REVID=101937143
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We no longer generate baseline coverage for all transitive source files in
every target; instead, we generate baseline coverage for the files in the
current target and collect all of them transitively. That means much smaller
but more baseline coverage files; the total content is smaller if you were
providing more than one target with overlapping transitive closures on the
command line.
In addition, we now collect baseline coverage for all targets in the transitive
closure of the top-level targets. Previously, if you only passed test targets,
you would not get any baseline coverage.
--
MOS_MIGRATED_REVID=101929897
|
|
|
|
|
|
|
|
|
|
| |
The baseline artifacts are part of the instrumented files provider now, and
are strongly tied to the collect_code_coverage flag. It seems to be simpler
to collect them explicitly in the BuildView (which already collects them for
post-processing), than to rely on the output group selection.
--
MOS_MIGRATED_REVID=101926341
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101818063
|
|
|
|
|
|
|
|
|
|
| |
We know what size these will be ahead of time, and they can get large,
presize since there's no reason not to. Also change arg type for related
methods to be Set since it's all we deal in and we know it will have
better performance on size than generic Iterable.
--
MOS_MIGRATED_REVID=101806154
|
|
|
|
|
|
|
|
| |
This is necessary to have TargetResolver depend on it without making it depend
on the packages target. First step of #389.
--
MOS_MIGRATED_REVID=101790345
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101765937
|
|
|
|
|
|
|
| |
exceptions from its cause.
--
MOS_MIGRATED_REVID=101673097
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101575207
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101572295
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101570634
|
|
|
|
|
|
|
|
|
| |
Parents should depend on their children's transience to force their re-evaluation, not say directly that they are transient. This can lead to an inconsistency between whether an ErrorInfo says it is transient and whether the node depends on the ErrorTransienceValue.
This should reduce the number of edges in the graph in case of transient error without sacrificing correctness.
--
MOS_MIGRATED_REVID=101537029
|
|
|
|
|
|
|
|
|
| |
if it isn't newer than the current node.
ErrorTransienceValue has to be treated specially during pruning because normally deps added during pruning remain if the node is actually rebuilt. The whole point of ErrorTransienceValue is that on a re-evaluation, the node may not depend on it anymore. So we have special logic to force a rebuild if the ErrorTransienceValue has changed. If it hasn't, however, it is ok for pruning to add it back as a dep -- we'll end up marking this value clean, since ErrorTransienceValue is always the last dep.
--
MOS_MIGRATED_REVID=101522197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a big change, so let me walk you through the key pieces:
1) This cl provides an alternative mechanism for creating configurations and doing configuration transitions that's "dynamic" in that the configurations can be created on the fly and the transitions are arbitrary mappings from BuildOptions --> BuildOptions that can also be created on the fly. It also integrates this with ConfiguredTargetFunction, so the configured target graph automatically uses this framework.
2) It does *not* replace old-style (which we'll call "static") configurations. For a number of important reasons: It's not yet at feature parity (particularly: no LIPO). It's not remotely tested across real projects enough to have confidence that it's battle-ready. It doesn't yet handle certain "special" functions like BuildConfiguration.prepareToBuild() and BuildConfiguration.getRoots(). It still relies on the old static transition logic to determine what transitions to apply (eventually we'll distribute that logic out, but that's too much for a single cl). We need the option to toggle it on and off until we have enough confidence in it. So with this cl, builds can be done in either mode.
3) The new flag --experimental_dynamic_configs toggles use of dynamic configurations.
4) Dynamic configurations are created with the Skyframe function BuildConfigurationFunction (this was already created in an earlier change). This consumes a BuildOptions and a set of configuration fragments to produce a BuildConfiguration.
5) Dynamic transitions are instances of the new class PatchTransition, which simply maps an input BuildOptions to an output BuildOptions.
6) Since static and dynamic configurations have to co-exist (for now), this cl tries hard to keep today's transition logic defined in a single place (vs. forking a dedicated copy for each configuration style). This is done via the new interface BuildConfiguration.TransitionApplier. BuildConfiguration.evaluateTransition is modified to feed its transition logic into TransitionApplier's common API. Both dynamic and static configurations have their own implementations that "do the right thing" with the results.
7) The transition applier for dynamic configurations basically stores the Transition, then allows DependencyResolver (which calls BuildConfiguration.evaluateTransition) to return Dependency instances containing that Transition (vs. a BuildConfiguration, which they traditionally contain).
7.5) An earlier variation of the dynamic transition applier retained BuildOptions (e.g. when it got a Transition it immediately applied it to get its output BuildOptions, then stored that). This had the advantage of making composing of transitions easier, especially within BuildConfiguration.evaluateTransition (which can theoretically apply multiple transitions to the input configuration). But it turns out that applying transitions has a cost, and it's simply more performant to pass them through until they're really needed.
8) In dynamic configuration mode, after ConfiguredTargetFunction gets its deps (e.g. an <Attribute, Dependency> multimap), it "trims" the configurations for its dependencies by a) only including config fragments required by the deps' subtrees and b) applying the transitions that came from 7). This all happens in the new method ConfiguredTargetFunction.trimConfigurations.
9) trimConfigurations is heavily performance-optimized based on a lot of experience running this through a large project within Google. As it turns out, the cost of host transitions can be atrocious (because there are a lot of them). Also, BuildOptions.clone() is expensive. And just creating BuildConfiguration SkyKeys also has a cost (largely because of BuildOptions cloning), so that shouldn't be done except when really necessary. My experience with this convinced me it's worth making this method complicated for the sake of making it fast. Since it basically visits every edge in the configured target graph (at least), it really needs to be slick.
10) Since host transitions in particular are problematic w.r.t. speed, I compute the host *once* in ConfigurationCollectionFunction.getHostConfiguration() and expose that reference to ConfiguredTargetFunction and other Skyframe functions. This limits recomputation to just when the fragments are trimmed.
11) Since options cloning is expensive, I'm doing something scary: exposing a BuildConfiguration.getOptions() method that returns a direct reference. Since BuildOptions is mutable, this is dangerous in the wrong hands. I can experiment with going back to cloning (with the caching of host transitions it may not matter as much), but we may ultimately have to put up with this risk for the sake of performant analysis time. What would be *really* awesome would be to make BuildOptions immutable. But that's not going to happen in this cl.
So in short, the key abstractions in this cl are:
- PatchTransition
- BuildConfiguration.TransitionApplier
- ConfiguredTargetFunction.trimConfigurations
The current implementation imposes no analysis time penalty
--
MOS_MIGRATED_REVID=101474620
|
|
|
|
|
|
|
|
|
|
| |
Rename some methods to avoid clashes.
Add function formattable to create lazily-formatted objects,
remove now unused strFormattable and reprFormattable.
Also some whitespace cleanup.
--
MOS_MIGRATED_REVID=101459565
|
|
|
|
|
|
|
|
|
|
|
|
| |
use non-declared inputs) and safety (spawns can no longer affect the host system, e.g. accidentally wipe your home directory). This implementation works on Linux only and uses Linux containers ("namespaces").
The strategy works with all actions that Bazel supports (C++ / Java compilation, genrules, test execution, Skylark-based rules, ...) and in tests, Bazel could successfully bootstrap itself and pass the whole test suite using sandboxed execution.
This is not the default behavior yet, but can be activated explicitly by using:
bazel build --genrule_strategy=sandboxed --spawn_strategy=sandboxed //my:stuff
--
MOS_MIGRATED_REVID=101457297
|