aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* Avoid repeated copies of RuleClass attributes.Gravatar Eric Fellheimer2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101707604
* Verify values for selects in attributes with allowed values.Gravatar Michael Staib2015-08-28
| | | | | | | | | | Currently, the selector list is passed to the allowed value predicate. Since the allowed value predicate obviously does not understand this, it fails with an ugly error. This change causes it to instead check every possible value of the attribute to ensure they're all valid. -- MOS_MIGRATED_REVID=101705850
* Only construct ErrorInfo string when error is not a cycleGravatar Mark Schaller2015-08-28
| | | | | | | | | | | | Occasionally, when there is an error, but it's an acceptable error because it's a cycle, the ErrorInfo string is too large to construct. We should only construct the string for an error when we're going to print it out, which is when it's not a cycle. (We don't expect to see any non-cycle errors though.) -- MOS_MIGRATED_REVID=101697924
* Always create a generating action for _proguard.jar, even if no specs are ↵Gravatar Michael Staib2015-08-28
| | | | | | | | | | | | | | specified. Because configurable attributes can be used to create an android_binary which has no proguard_specs, and because it's impossible to tell this case at the time the implicit outputs are defined, some generating action must be defined even if no proguard_specs actually make it to the rule. If the proguard_generate_mapping attribute is specified, the mapping is also generated. Both are generated by a FailAction and so are not actually produced. -- MOS_MIGRATED_REVID=101694294
* Be resilient to a non-decreasing clock in ↵Gravatar Nathan Harmata2015-08-28
| | | | | | | | | BlazeRuntime#recordLastExecutionTime. Also add @Nullable annotations as appropriate. Fixes #394. -- MOS_MIGRATED_REVID=101685096
* Improve debugging of EvalExceptionGravatar Francois-Rene Rideau2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101679755
* Make load() work in remote repositories too.Gravatar Lukacs Berki2015-08-27
| | | | | | | | | 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
* Expose FilesToRun provider to Skylark.Gravatar Brian Silverman2015-08-27
| | | | | | | | | | 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
* EvalExceptionWithStackTrace does no longer remove non-EvalException ↵Gravatar Florian Weikert2015-08-27
| | | | | | | exceptions from its cause. -- MOS_MIGRATED_REVID=101673097
* Fix link order for all rules using the java library helper.Gravatar Ulf Adams2015-08-27
| | | | | | | | | | | 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
* Basic groovy_test supportGravatar Erik Kuefler2015-08-27
| | | | | | | -- Change-Id: I11d65bcacbb4a2037e29c6b3af7c4ff545636738 Reviewed-on: https://bazel-review.googlesource.com/#/c/1830/1 MOS_MIGRATED_REVID=101669018
* Remove the awkward default value marker from --symlink_prefix.Gravatar Lukacs Berki2015-08-27
| | | | | | | 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
* Ensures that EvalExceptionWithStackTrace does not have an empty exception ↵Gravatar Florian Weikert2015-08-27
| | | | | | | message. -- MOS_MIGRATED_REVID=101659996
* Distinguish between user-supplied ios_cpu and the default, and don't ↵Gravatar Michael Thvedt2015-08-27
| | | | | | | propagate the default to the XCode project control. -- MOS_MIGRATED_REVID=101644957
* Description redacted.Gravatar Michajlo Matijkiw2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101635740
* Expose the #asByteSource() method in FileSystemUtils.Gravatar Eric Fellheimer2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101628787
* Add a isLoadingPhase flag to EnvironmentGravatar Francois-Rene Rideau2015-08-27
| | | | | | | | | 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
* Description redacted.Gravatar Michajlo Matijkiw2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101598188
* Create ValidationEnvironment from EnvironmentGravatar Francois-Rene Rideau2015-08-27
| | | | | | | | 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
* Fix a bug in which the XcodeGen generates two Xcode target with the same ↵Gravatar Rumou Duan2015-08-27
| | | | | | | | | name (case-insensitive). RELNOTES:None -- MOS_MIGRATED_REVID=101587647
* Use a concurrent LoadingCache for SkylarkType.Simple as opposed to having to ↵Gravatar Nathan Harmata2015-08-27
| | | | | | | hold a global lock in order to get a skylark type. -- MOS_MIGRATED_REVID=101585120
* Fix check for srcs-less android_* rulesGravatar Liam Miller-Cushon2015-08-27
| | | | | | | | | | | | 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
* Expose java_import and android_library information to skylarkGravatar Liam Miller-Cushon2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101579648
* Add string.capitalize()Gravatar Laurent Le Brun2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101575207
* Skylark stack traces are now displayed in Python format.Gravatar Florian Weikert2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101572295
* Make writes thread-safe during local tests by opening files with O_APPEND.Gravatar Eric Fellheimer2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101572272
* Import MethodLibraryTest.java into bazelGravatar Francois-Rene Rideau2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101570634
* Clean up the link command action code a bit.Gravatar Ulf Adams2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101568873
* Fix word wrapping determinism on BSD / LinuxGravatar Damien Martin-Guillerez2015-08-27
| | | | | | | | | | fmt behaves totally differently depending on the version and on the OS, use fold instead that has a consistent behaviour accross platform. Tested with bazel test //scripts/release/... on OSX and Linux. -- MOS_MIGRATED_REVID=101567574
* Also add "bazel version" to the table of contents of the User's Guide. Not ↵Gravatar Lukacs Berki2015-08-26
| | | | | | | my best day today. -- MOS_MIGRATED_REVID=101557371
* Add the "version" and "mobile-install" commands to the User's Guide.Gravatar Lukacs Berki2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101555906
* Remove the callback that allowed excluding files from deletion.Gravatar Ulf Adams2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101555261
* Make Bazel compile (a previous change added a graph -> jsr305 dependency ↵Gravatar Lukacs Berki2015-08-26
| | | | | | | that was not reflected in the BUILD file) -- MOS_MIGRATED_REVID=101553809
* Don't mark ErrorInfo transient if one of its child ErrorInfos is transient.Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | | | 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
* Allow ErrorTransienceValue to be added back as a dep during change pruning ↵Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | | | 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
* Fix Skylark library link.Gravatar David Chen2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101519490
* Rename isSkylarkEnabled to isSkylarkGravatar Francois-Rene Rideau2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101518833
* Replace query option --order_results with --order_output, which can take ↵Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | | | | | 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
* Add toString() for PrepareDepsOfTargetsUnderDirectoryValue key.Gravatar Eric Fellheimer2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101510850
* Only perform one read of the hashCode field in our benign-data-racy ↵Gravatar Nathan Harmata2015-08-26
| | | | | | | hashCode() implementation. See http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html. -- MOS_MIGRATED_REVID=101490349
* Fix path for input fileGravatar Googler2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101485838
* Get rid of unnecessary synchronization. This is a contention point when we ↵Gravatar Nathan Harmata2015-08-26
| | | | | | | have lots of threads. -- MOS_MIGRATED_REVID=101485204
* Use sorted lists instead of sets for generated file list comparisonGravatar Googler2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101482632
* Implement the core structure for dynamic configurations.Gravatar Greg Estren2015-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Ignore ordering for generated files checkGravatar Googler2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101470280
* Fix flag name in Blog post about java configurationGravatar Damien Martin-Guillerez2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101470152
* Document Bazel releasesGravatar Damien Martin-Guillerez2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101465262
* Make sandboxed execution the default in Bazel. This should be safe, as the ↵Gravatar Philipp Wollermann2015-08-26
| | | | | | | 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
* No-op refactoring of output formatters to re-use common code.Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | This will make it easier for future changes to modify this common code. -- MOS_MIGRATED_REVID=101464103
* Remove unnecessary use of ResolvedTargets in SkyQueryEnvironment.Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | 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