aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
...
* Inline Constants.IOS_DEVICE_RULE_CLASSES.Gravatar Ulf Adams2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101769828
* Remove the WATCHFS_BLACKLIST from Constants.java.Gravatar Ulf Adams2015-08-28
| | | | | | | Instead, inject the list from the corresponding module. -- MOS_MIGRATED_REVID=101769355
* Push local and shard_count documentation.Gravatar Ulf Adams2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101768878
* Improve documentation and error messages for sets.Gravatar Laurent Le Brun2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101765937
* Fix a typo.Gravatar Ulf Adams2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101762412
* Fix $(location //external:some_tool) expansion for genrules.Gravatar Brian Silverman2015-08-28
| | | | | | | | | | | | Previously, targets in "tools" of genrules could only be expanded in $(location)s as the target of the bind. This is another part of fully fixing #90. -- Change-Id: I91444fbfe551b651c46811014639f08f779c70aa Reviewed-on: https://bazel-review.googlesource.com/#/c/1750/ MOS_MIGRATED_REVID=101760690
* Fix C++ link order for py_library and py_binary rules.Gravatar Ulf Adams2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101756783
* Make dangling symlinks in external repositories work to some degree.Gravatar Lukacs Berki2015-08-28
| | | | | | | | | | | | | | | | | This seems to be the least insane approach within the following boundaries: - Skyframe apparently doesn't allow GlobFunction to recover if FileFunction had already raised an exception that Skyframe knows about (this is somewhat surprising) - I didn't want to change FileFunction not to throw an exception for dangling symlinks because this part of the code is scary - I didn't want to revert to Skyframe-based symlink resolution for symlinks in immutable directories because that would be a performance hit - I didn't want to write yet another symlink resolver and the two existing ones (FileSystem#resolveSymlinks() and and FileFunction#getSymlinkTargetRootedPath()) don't work: the former cannot resolve just one level of symlinks and the latter cannot do its job without adding Skyframe dependencies I had to put in a placeholder value for realRootedPath when the FileValue represents a dangling symlink, because FileStateValue.create() relies on the symlink target being different than the symlink itself. RELNOTES: -- MOS_MIGRATED_REVID=101756189
* Don't unnecessarily concatenate Strings just for an error message in an ↵Gravatar Nathan Harmata2015-08-28
| | | | | | | IllegalStateException that might not be thrown at all. -- MOS_MIGRATED_REVID=101748191
* Presize the LinkedHashSet to which we add glob results.Gravatar Nathan Harmata2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101743615
* Add a @deprecated annotation to Runfiles#addArtifacts.Gravatar Carmi Grushko2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101730178
* Avoid internal resizing when converting ListType.Gravatar Eric Fellheimer2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101723683
* Change blaze default arguments for ObjC 'fastbuild' to match better ↵Gravatar Googler2015-08-28
| | | | | | | | | -DDEBUG=1 (from -DDEBUG). RELNOTES: change ObjC -DDEBUG in fastbuild to -DDEBUG=1 -- MOS_MIGRATED_REVID=101716428
* Stop removing onlyLoadingPhase bindingsGravatar Francois-Rene Rideau2015-08-28
| | | | | | | | They are now disabled based on a dynamic flag instead. It's all too easy to bypass removal with duplication, anyway, as in my_native_glob = native.glob -- MOS_MIGRATED_REVID=101714237
* 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
* 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
* 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
* Clean up the link command action code a bit.Gravatar Ulf Adams2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101568873
* 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
* 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
* 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
* 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
* Link to tools/objc/dummy.c from output directory to allow xcodeproj to ↵Gravatar Chris Parsons2015-08-26
| | | | | | | resolve the file even while outside a workspace which contains it -- MOS_MIGRATED_REVID=101462428
* Port to FreeBSD.Gravatar Doug Rabson2015-08-26
| | | | | | | -- Change-Id: I4e65cc583e758d2f7e45209ffcb37f6a871e2ed7 Reviewed-on: https://bazel-review.git.corp.google.com/#/c/1840 MOS_MIGRATED_REVID=101462155
* Instead of assuming that sandboxing will generally work on everything that ↵Gravatar Philipp Wollermann2015-08-26
| | | | | | | | | 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
* Refactor skylark format internalsGravatar Francois-Rene Rideau2015-08-26
| | | | | | | | | | 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