aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
Commit message (Collapse)AuthorAge
* Global cleanup change.Gravatar Googler2017-03-23
| | | | | | -- PiperOrigin-RevId: 151019690 MOS_MIGRATED_REVID=151019690
* Remove provider safety check and make all old ctx objects featurelessGravatar Vladimir Moskva2017-03-23
| | | | | | | | | | | | It's now allowed to return anything from a rule implementation function. If a ctx object is returned it becomes featureless and cannot be used from anywhere else (i.e. from an implementation function of another rule). Fixes #2319 -- PiperOrigin-RevId: 151015919 MOS_MIGRATED_REVID=151015919
* Rollback of commit 1e18045ed9d6ab9c945cec69286a7d8bd288a507.Gravatar Tobias Werth2017-03-23
| | | | | | -- PiperOrigin-RevId: 151000602 MOS_MIGRATED_REVID=151000602
* Adding a more descriptive error message to ConcurrentMapActionCacheGravatar Googler2017-03-23
| | | | | | -- PiperOrigin-RevId: 150930281 MOS_MIGRATED_REVID=150930281
* Show more sensible error messages for invalid placeholders Gravatar Pranjal Agrawal2017-03-23
| | | | | | | | | | | | | | | | (like %{invalid}) in implicit outputs. SkylarkImplicitOutputsFunctionWithMap.calculateOutputs now throws an EvalException in case of invalid placeholders in com.google. \ devtools.build.lib.packages.ImplicitOutputsFucntion. Fix #2467 on Github -- Change-Id: I5460388d0b3f83390aed4c45c967c633c2574e3b Reviewed-on: https://cr.bazel.build/9490 PiperOrigin-RevId: 150907001 MOS_MIGRATED_REVID=150907001
* Enable Android parallel resource processing by default.Gravatar Adam Michael2017-03-23
| | | | | | -- PiperOrigin-RevId: 150906229 MOS_MIGRATED_REVID=150906229
* Honor SOURCE_DATE_EPOCH in bootstrapping Gravatar Klaus Aehlig2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a stamped bazel binary contains the actual timestamp at build time. This means, that building bazel we either include no version information at all, or the binary contains a not reproducible time stamp. Both are not acceptable from the point of view of a downstream maintainer of a bazel package, where the requirement is that the package be reproducible, but the binary still provide sensible version information. Fortunately, there is a suggested standard to solve this problem taking the "current time" from the SOURCE_DATE_EPOCH environment variable, if set, rather than the actual time. See https://reproducible-builds.org/specs/source-date-epoch/. Honor this proposed standard, so that bazel can reasonably be packaged downstream. See issue #2240. Note that we only use the environment variable in our bootstrap script; for bazel itself we communicate that information via an appropriate option. -- Change-Id: I55409a117285b9a3446421179c20f4e8c59088f8 Reviewed-on: https://cr.bazel.build/9467 PiperOrigin-RevId: 150896326 MOS_MIGRATED_REVID=150896326
* BEP: Also report the original command line Gravatar Klaus Aehlig2017-03-23
| | | | | | | | | | | In the protocol, also report the command line as received by the server, before and option handlers modify it. -- Change-Id: If5bab172944679752477836a5f499d2837201888 Reviewed-on: https://cr.bazel.build/9453 PiperOrigin-RevId: 150894322 MOS_MIGRATED_REVID=150894322
* BEP: Use TestStatus enum to report the status of a TestResultGravatar Jakob Buchgraber2017-03-23
| | | | | | | | -- Change-Id: I07c15f7d232a3e9363ebedfb9b5523999630c401 Reviewed-on: https://cr.bazel.build/9450 PiperOrigin-RevId: 150887776 MOS_MIGRATED_REVID=150887776
* Correct header thinning in ObjC crosstool rules so that objc_frameworkGravatar Googler2017-03-23
| | | | | | | | imports can be discovered. -- PiperOrigin-RevId: 150882114 MOS_MIGRATED_REVID=150882114
* Add an optional coverage_files argument to cc_toolchainGravatar Googler2017-03-22
| | | | | | | | | | | | Allow toolchains to specify precisely the files required to run code coverage tools (e.g. gcov). If not specifed, default to the existing behaviour of supplying the whole crosstool. RELNOTES[NEW]: Optional coverage_files attribute to cc_toolchain -- PiperOrigin-RevId: 150878146 MOS_MIGRATED_REVID=150878146
* Enable SkylarkCallable methods to be used on ClassObjects.Gravatar Michael Staib2017-03-22
| | | | | | | | | | | | | | | Previously, ClassObjects' SkylarkCallable struct fields worked as expected (with values of the struct taking precedence), but calling methods annotated with SkylarkCallable did not work at all; methods were treated as if they were not present in the struct. This adds some tests for the various ways of looking up fields and methods, and rearranges the logic in FuncallExpression to allow for callable methods on SkylarkClassObject's descendants. -- PiperOrigin-RevId: 150876181 MOS_MIGRATED_REVID=150876181
* Filter android_binary resources by screen density in the analysis phaseGravatar Googler2017-03-22
| | | | | | | | | | | | | | In addition to filtering android_binary resources by resource_configuration_filters, we also filter by densities. Doing this in analysis rather than execution should also result in a speed-up as there's no need to copy files unwanted for actions to use. This behavior is controlled by the same object and flags that already control resource configuration filtering, simplifying the code. -- PiperOrigin-RevId: 150871620 MOS_MIGRATED_REVID=150871620
* Fix dir() on Targets with aspects applied.Gravatar Dmitry Lomov2017-03-22
| | | | | | -- PiperOrigin-RevId: 150869561 MOS_MIGRATED_REVID=150869561
* Partial rollback of commit dd142c93fd4939aaec30726f275644ca9446fea2.Gravatar Philipp Wollermann2017-03-22
| | | | | | | | Should fix #2721. -- PiperOrigin-RevId: 150866145 MOS_MIGRATED_REVID=150866145
* --Gravatar Carmi Grushko2017-03-22
| | | | | PiperOrigin-RevId: 150810735 MOS_MIGRATED_REVID=150810735
* Remove only-in-tests null checks in SkyframeActionExecutor.Gravatar Janak Ramakrishnan2017-03-22
| | | | | | | | Still on step -0.5, let's be honest. -- PiperOrigin-RevId: 150783638 MOS_MIGRATED_REVID=150783638
* Fix --nouse_action_cache for tests.Gravatar Googler2017-03-22
| | | | | | | | | | Moves management of the unconditionalExecution status in TestRunnerAction to a lazily initialized value internal to TestRunnerAction, since the class can no longer rely on ActionCacheChecker calling unconditionalExecution(). -- PiperOrigin-RevId: 150751922 MOS_MIGRATED_REVID=150751922
* Rollback of commit 65a9bc9a79a660291210719862bc194a87311943.Gravatar Googler2017-03-22
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Root cause for issue addressed in unknown commit so rolling back rollback. *** Original change description *** Automated [] rollback of commit e450c00bf487c711f9b0615e9eb89980c5732b4a. *** Reason for rollback *** Breaks nightly, see []. *** Original change description *** Inject aidl_lib only to android_library targets that have idl_srcs -- PiperOrigin-RevId: 150751650 MOS_MIGRATED_REVID=150751650
* Support Fission (-gsplit-dwarf) when generating C++ modular object files.Gravatar Googler2017-03-22
| | | | | | -- PiperOrigin-RevId: 150751431 MOS_MIGRATED_REVID=150751431
* Add Action context mnemonic to imprecise spawn strategy error message.Gravatar Chloe Calvarin2017-03-22
| | | | | | -- PiperOrigin-RevId: 150750767 MOS_MIGRATED_REVID=150750767
* Fix linux sandbox to create empty files correctly.Gravatar Ulf Adams2017-03-22
| | | | | | | | | | | Using /dev/null was causing it to create symlinks to /dev/null, which breaks Python programs. I didn't catch this earlier, because my machine had an old linux kernel installed that didn't support sandboxing. There's an existing integration test, which just broke in our CI. -- PiperOrigin-RevId: 150750032 MOS_MIGRATED_REVID=150750032
* Add a BuildEvent capable of storing the original command line Gravatar Klaus Aehlig2017-03-21
| | | | | | | | | | | | ...so we can report it in the build event protocol no matter what changes the various option parsers and modules do to the command line. -- Change-Id: I497d6dbbf1fc2849580271833797755cb0c9d13c Reviewed-on: https://cr.bazel.build/9452 PiperOrigin-RevId: 150737198 MOS_MIGRATED_REVID=150737198
* Fix python stub template for python3 on Windows Gravatar Yun Peng2017-03-21
| | | | | | | | | | | | | | | | | | | 1. Adding UNC prefix after os.path.join, so that paths will be normalized and absolute. 2. Make example/py_native/bin.py work in python3 3. Add a shell test for building python binary with python3 4. Run all tests in batch mode Fix https://github.com/bazelbuild/bazel/issues/2708 -- Change-Id: I8dc18c80ebba87e965fe6fef9978732e6c35b1f0 Reviewed-on: https://cr.bazel.build/9456 PiperOrigin-RevId: 150734716 MOS_MIGRATED_REVID=150734716
* Add SpawnInputExpander helper class to arrange runfiles for spawn strategiesGravatar Ulf Adams2017-03-21
| | | | | | | | | | | | | | | | | | | | | This new class is a combination of SpawnHelper and our internal code; the plan is to migrate all spawn strategies to the new class. The strict flag should be enabled by default, but that's a breaking change, so we need to do it later. - Use it in SandboxStrategy. - Add ActionInput.getExecPath to return a PathFragment; this avoids lots of back and forth between path fragments and strings. This is a step towards #1593. The previous attempt was missing a one-line patch in StandaloneTestStrategy, which broke all tests with sandboxing. StandaloneTestStrategy was fixed in a separate change, so this should be safe now. -- PiperOrigin-RevId: 150733457 MOS_MIGRATED_REVID=150733457
* fix typo in javasemantics docsGravatar Googler2017-03-21
| | | | | | -- PiperOrigin-RevId: 150713396 MOS_MIGRATED_REVID=150713396
* adds feature_of and feature_after attrs to android_binary. these are ↵Gravatar Googler2017-03-21
| | | | | | | | android_binary rules whose .apk artifacts get piped through appt to support split apks -- PiperOrigin-RevId: 150701976 MOS_MIGRATED_REVID=150701976
* --Gravatar Adam Michael2017-03-21
| | | | | PiperOrigin-RevId: 150684447 MOS_MIGRATED_REVID=150684447
* Clarifies some javadoc in Rule and AttributeContainer.Gravatar Alex Humesky2017-03-21
| | | | | | -- PiperOrigin-RevId: 150675067 MOS_MIGRATED_REVID=150675067
* Enforce that the SkyKey returned by ActionLookupKey#getSkyKey is an ↵Gravatar Janak Ramakrishnan2017-03-21
| | | | | | | | | | ActionLookupKey. It was only being violated for some singleton keys. Also do some drive-by cleanups of unused variables. Step approximately -2. -- PiperOrigin-RevId: 150668944 MOS_MIGRATED_REVID=150668944
* Enable rules to transition based on their Rule objects.Gravatar Michael Staib2017-03-21
| | | | | | | | | | | | This begins to allow for cases where a rule sets configuration based on its attributes, such as where a rule attribute names flags and their values - sort of a reverse select. There are no such cases yet, but they're coming! -- PiperOrigin-RevId: 150648357 MOS_MIGRATED_REVID=150648357
* RELNOTES[NEW]: If grte_top is a label, it can now follow non-configurable ↵Gravatar Googler2017-03-21
| | | | | | | | redirects. -- PiperOrigin-RevId: 150647389 MOS_MIGRATED_REVID=150647389
* Make explicit that no I/O is done when constructing a FileArtifactValue for ↵Gravatar Janak Ramakrishnan2017-03-21
| | | | | | | | | | | | an ordinary Artifact in ArtifactFunction. If the data available in the FileValue is not sufficient to recreate the FileArtifactValue without disk access, then ActionMetadataHandler already stores the FileArtifactValue separately. This is approximately step -3 in a grand plan to save a bunch more memory when building with --batch --discard_analysis_cache --keep_going. -- PiperOrigin-RevId: 150646007 MOS_MIGRATED_REVID=150646007
* Define the ConfigFeatureFlagConfiguration fragment.Gravatar Michael Staib2017-03-21
| | | | | | | | | | | | This will eventually be used to store the values of user-defined configuration flags, once such a rule is added. Because this rule does not exist yet, this fragment is currently not part of the rule class provider. This will have to be done when that rule is turned on. -- PiperOrigin-RevId: 150638292 MOS_MIGRATED_REVID=150638292
* Make the spell checker a bit more conservative.Gravatar Laurent Le Brun2017-03-21
| | | | | | | | | Reduce the max spell-checking distance for matching words. "target" will not match "range" anymore. -- PiperOrigin-RevId: 150638073 MOS_MIGRATED_REVID=150638073
* Rationalize null-ness checks in RunfilesGravatar Ulf Adams2017-03-21
| | | | | | | | | | | This now also checks symlink maps for null pointers, which it previously did not. Unfortunately, there's still one case where we add a null target to Runfiles (to represent an empty file) - this happens in Runfiles itself, and this change prevents any callers from doing so. -- PiperOrigin-RevId: 150634481 MOS_MIGRATED_REVID=150634481
* Replace native AndroidStudioInfoAspect with an error message.Gravatar Googler2017-03-21
| | | | | | | | BUG=33295755 -- PiperOrigin-RevId: 150633735 MOS_MIGRATED_REVID=150633735
* Add ActionInput.getExecPath, which returns a PathFragmentGravatar Ulf Adams2017-03-21
| | | | | | | | | | | | Update some callers to use getExecPath, which generally results in less intermediate garbage generation (almost all callers need a PathFragment, not a String). Another small step towards #1593. -- PiperOrigin-RevId: 150631279 MOS_MIGRATED_REVID=150631279
* Document default_provider.Gravatar Vladimir Moskva2017-03-21
| | | | | | | | | The documentation is not final as default_provider is not completely implemented now, but it reflects its current state. -- PiperOrigin-RevId: 150627015 MOS_MIGRATED_REVID=150627015
* Use a relative path for the runfiles treeGravatar Ulf Adams2017-03-21
| | | | | | | | | | Add preconditions to enforce this and remove some now unnecessary code. A small step towards #1593. -- PiperOrigin-RevId: 150625693 MOS_MIGRATED_REVID=150625693
* Fix a bug whereupon a String was compared to a PathFragment.Gravatar Lukacs Berki2017-03-21
| | | | | | -- PiperOrigin-RevId: 150623623 MOS_MIGRATED_REVID=150623623
* BuildEventStreamer: fix handling of postedEvents Gravatar Klaus Aehlig2017-03-21
| | | | | | | | | | | | | Always initialize the set of postedEvents. Also, record the initial event as posted. In this way, the build event streamer can also handle events that should be posted after the BuildStartedEvent but are told the streamer about earlier. -- Change-Id: Ic796f2434434819e6c62633755411527a9dcb7e0 Reviewed-on: https://cr.bazel.build/9451 PiperOrigin-RevId: 150620387 MOS_MIGRATED_REVID=150620387
* Rollback of commit 59180a4ea66b1395b5b85defd732859ecae919ea.Gravatar Yue Gan2017-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break bazel-tests and many other jobs on CI. http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/651/console *** Original change description *** Add SpawnInputExpander helper class to arrange runfiles for spawn strategies This new class is a combination of SpawnHelper and our internal code; the plan is to migrate all spawn strategies to the new class. The strict flag should be enabled by default, but that's a breaking change, so we need to do it later. - Use it in SandboxStrategy. - Add ActionInput.getExecPath to return a PathFragment; this avoids lots of back and forth between path fragments and strings. This is a step towards #159... *** -- PiperOrigin-RevId: 150610616 MOS_MIGRATED_REVID=150610616
* Support aliases in the --experimental_stl attribute.Gravatar Lukacs Berki2017-03-20
| | | | | | -- PiperOrigin-RevId: 150610613 MOS_MIGRATED_REVID=150610613
* Rollback of commit a58f245a4b40c0ef961b1f30d96b16a9349711c3.Gravatar Tobias Werth2017-03-20
| | | | | | | | | | | | | | | *** Reason for rollback *** broke over 100k targets, in the depot, see [] *** Original change description *** Move library R generation to a separate action, ensuring the merging happens off the java critical path. -- PiperOrigin-RevId: 150602545 MOS_MIGRATED_REVID=150602545
* Create "internal" category of command-line options.Gravatar Michael Staib2017-03-20
| | | | | | | | | | | | | | | | | | | | This is intended to be used for "flags" which should never appear on the command line - things like configuration distinguishers, which are used internally and must be part of the build options, but should always be set to their default value at the top level. This is already a convention within Bazel, but doesn't actually work the way Bazel expects - flags with spaces can be set by simply escaping or quoting the spaces so that word splitting will not break on them. This means they can also be matched by config_settings, which pass a single string. Forbidding the parser from matching these flags solves both of these unintended cases. Existing cases like this have also been converted to internal. -- PiperOrigin-RevId: 150497246 MOS_MIGRATED_REVID=150497246
* Automatically set --jobs based on the number of CPU threads.Gravatar Julio Merino2017-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the new magic value "auto" to --jobs and makes this the default. When --jobs=auto, we determine the number of available CPU threads and set a reasonable value for --jobs based on this number. I'm explicitly not defining what "reasonable" means because we may want to change the heuristics later on. The goal here is to reduce the load on the system when running Bazel while not adversely affecting build times significantly. Previous versions of Bazel defaulted --jobs to 200, which could easily overload the local machine with a lot of processes. This value was derived from Blaze's default, which makes sense because most jobs are network-bound due to distributed execution; however, in the Bazel case, this never made sense and is actually harmful. This change was initiated by problems observed on Macs where Bazel would bring machines to their knees due to system resource overload. It's likely that the overload is caused by too much RAM usage rather than CPU, but both of these should go down with a more limited jobs value. Should help alleviate issue #1160. RELNOTES: The --jobs flag now defaults to "auto", which causes Bazel to use a reasonable degree of parallelism based on the local machine's capacity. -- PiperOrigin-RevId: 150466088 MOS_MIGRATED_REVID=150466088
* Make JavaCompileAction subclass SpawnActionGravatar Liam Miller-Cushon2017-03-20
| | | | | | | | | | | | | instead of rolling its out action logic. Also remove support for the 'min classpath' optimization. JavaCompileAction is a subclass (instead of a SpawnAction instance) only to allow tests to use the Java-specific getters that were added to JavaCompilationAction. -- PiperOrigin-RevId: 150463724 MOS_MIGRATED_REVID=150463724
* Move library R generation to a separate action, ensuring the merging happensGravatar Googler2017-03-20
| | | | | | | | off the java critical path. -- PiperOrigin-RevId: 150460041 MOS_MIGRATED_REVID=150460041
* Add sourcepath to java_common.compileGravatar Irina Iancu2017-03-20
| | | | | | | | | | | | and remove support for -sourcepath through javacopts. Progress on #2606. Supporting -implicit:none by default will be done in an upcoming change. -- PiperOrigin-RevId: 150445185 MOS_MIGRATED_REVID=150445185