| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
| |
BlazeRuntime#recordLastExecutionTime. Also add @Nullable annotations as appropriate.
Fixes #394.
--
MOS_MIGRATED_REVID=101685096
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101679755
|
|
|
|
|
|
|
|
|
| |
Previously, load() always looked up .bzl files in the main repository. Ideally, it would just take a label and then it would work by default, but for the time being, this quick fix will do.
I had to put in an evil hack to make load() statements work in the prelude, because we currently have no way to distinguish load() statements from the prelude and from the BUILD file. Again, a proper label-based load() would solve this.
--
MOS_MIGRATED_REVID=101677502
|
|
|
|
|
|
|
|
|
|
| |
It is now possible to get the main executable of *_binary rules with
target.files_to_run.executable.
--
Change-Id: I4a81f216bdd237fc5b0e7dbd7d0a312558f3cf2c
Reviewed-on: https://bazel-review.googlesource.com/#/c/1760/
MOS_MIGRATED_REVID=101675365
|
|
|
|
|
|
|
| |
exceptions from its cause.
--
MOS_MIGRATED_REVID=101673097
|
|
|
|
|
|
|
|
|
|
|
| |
By default, we collect Java-specific link options first, and only collect C++
link options if the dependency does not have Java ones.
Longer term, the language-specific link options providers should be replaced by
aspects.
--
MOS_MIGRATED_REVID=101669588
|
|
|
|
|
|
|
| |
The wording of the help text is somewhat awkward, but we cannot mention "Bazel" explicitly because the string "Bazel" comes from Constants.java .
--
MOS_MIGRATED_REVID=101664076
|
|
|
|
|
|
|
| |
message.
--
MOS_MIGRATED_REVID=101659996
|
|
|
|
|
|
|
| |
propagate the default to the XCode project control.
--
MOS_MIGRATED_REVID=101644957
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101635740
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101628787
|
|
|
|
|
|
|
|
|
| |
Have loadingPhase-only methods check that flag.
It's no use removing the initial bindings to these methods
when they may have been copied anyway.
--
MOS_MIGRATED_REVID=101624770
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101598188
|
|
|
|
|
|
|
|
| |
Allow ValidationEnvironment to be created from initial Environment so that
there is no need to manually keep two different sets of constructors in synch.
--
MOS_MIGRATED_REVID=101588695
|
|
|
|
|
|
|
| |
hold a global lock in order to get a skylark type.
--
MOS_MIGRATED_REVID=101585120
|
|
|
|
|
|
|
|
|
|
|
|
| |
In android rules with no srcs, deps are treated like exports by strict java
deps. This fixes the check for srcs-less targets to consider srcjars in
addition to .java files.
This bug was fixed for java_* rules by adding the runtime_deps attribute, and
disallowing deps in srcs-less rules.
--
MOS_MIGRATED_REVID=101581572
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101579648
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101575207
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101572295
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101568873
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101518833
|
|
|
|
|
|
|
|
|
|
|
| |
three values for a given output formatter: 'no', 'deps', or 'full'. A fourth value, 'auto', means either 'deps' or 'full' depending on the formatter.
The option 'no' is equivalent to --noorder_results. 'full' means that output will be deterministically ordered, using alphabetization if necessary. 'deps' means that graph order will be preserved (where applicable), but further efforts to order the output may not be undertaken. 'auto' is equivalent to 'full' for all output formatters except for proto, minrank, maxrank, and graph, for which it is equivalent to 'deps'.
The purpose of this cl is to enable genquery to force completely deterministic output, which requires that it be able to specify a total ordering on the graph that is consistent across runs. Which ordering doesn't matter very much, so depending on the output formatter, or even within the same one, there may be some groups of nodes that are ordered alphabetically, and some reverse alphabetically.
--
MOS_MIGRATED_REVID=101512292
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101510850
|
|
|
|
|
|
|
| |
hashCode() implementation. See http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html.
--
MOS_MIGRATED_REVID=101490349
|
|
|
|
|
|
|
| |
have lots of threads.
--
MOS_MIGRATED_REVID=101485204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
strategy is only used if your Linux kernel is new enough and your running system supports it. If this breaks you, please file a bug and you can always go back to non-sandboxed execution by using --spawn_strategy=standalone.
--
MOS_MIGRATED_REVID=101464269
|
|
|
|
|
|
|
| |
This will make it easier for future changes to modify this common code.
--
MOS_MIGRATED_REVID=101464103
|
|
|
|
|
|
|
| |
ResolvedTargets#getTargets already doesn't contain any of ResolvedTargets#filteredTargets, and there is a 1-1 mapping between Labels and Targets, so the filtering we were doing was useless.
--
MOS_MIGRATED_REVID=101463111
|
|
|
|
|
|
|
| |
resolve the file even while outside a workspace which contains it
--
MOS_MIGRATED_REVID=101462428
|
|
|
|
|
|
|
| |
--
Change-Id: I4e65cc583e758d2f7e45209ffcb37f6a871e2ed7
Reviewed-on: https://bazel-review.git.corp.google.com/#/c/1840
MOS_MIGRATED_REVID=101462155
|
|
|
|
|
|
|
|
|
| |
is Linux, do real auto-detection whether it is supported on the host or not and enable / disable it based on the result.
The warning that is printed when the Linux kernel is too old to support sandboxing can be disabled via a flag.
--
MOS_MIGRATED_REVID=101461120
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
generator_name and generator_function.
Additionally, both Skylark macros and build extensions set the attribute generator_location in order to store the name of the file where generator_function was defined.
--
MOS_MIGRATED_REVID=101458757
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101458091
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101457236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that Bazel finds Android tools and update the tools themselves to handle their new location.
This paves the way for eventually referencing every tool this way.
We have to figure out if android_http_tools_repository is the right way to distribute the Android tools, but now that we don't have a binary distribution yet, it's not an immediate problem.
This will break existing users of Android support in Bazel, whom I'll inform over bazel-discuss.
Fixes #384.
--
MOS_MIGRATED_REVID=101456190
|
|
|
|
|
|
|
|
|
| |
All affected rules were annotated, and all known affected Skylark rules were
also annotated. The documentation was updated, so it looks like we're good
to go.
--
MOS_MIGRATED_REVID=101450297
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101388809
|
|
|
|
|
|
|
|
| |
In practice there are generally very few of these, keep a chache
to avoid dups.
--
MOS_MIGRATED_REVID=101386883
|
|
|
|
|
|
|
| |
looking for the .runfiles path and the Python interpreter binary.
--
MOS_MIGRATED_REVID=101380117
|
|
|
|
|
|
|
| |
implementations.
--
MOS_MIGRATED_REVID=101379672
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101377320
|
|
|
|
|
|
|
| |
SkylarkEnvironment's recursion detection.
--
MOS_MIGRATED_REVID=101374341
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, shared objects in the transitive closure of an Android binary would be linked
in, but not be sent to the apkbuilder. This sends all the shared objects used for linking
to join the other native libraries in the APK, so they will be loadable when the main
library created by the link step is loaded.
Fixes #357.
--
MOS_MIGRATED_REVID=101365491
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101363350
|
|
|
|
|
|
|
|
|
| |
//external: targets can depend on anything and visibility is checked a the edges incoming to said labels.
Fixes #388.
--
MOS_MIGRATED_REVID=101363086
|