aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
Commit message (Collapse)AuthorAge
* Change execution root for external repositories to be ../repoGravatar Kristina Chodorow2016-09-20
| | | | | | | | | | | | | | | | | | | | | | | Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133606309
* Remove some more occurences of deprecated getExecRoot() callsGravatar Kristina Chodorow2016-09-15
| | | | | -- MOS_MIGRATED_REVID=133257532
* Track client environment in SkyframeGravatar Klaus Aehlig2016-09-14
| | | | | | | | | | | | | ...to determine which actions have to be recomputed based on changes to the client environment. Note that this change does it the simple way and reconsideres all actions on a changed client environment, while still only reexecuting those, where the part that was inherited from the environment actually did change. -- Change-Id: Ie1116d094642165e5e959447a6fcf49d19b37d6e Reviewed-on: https://bazel-review.googlesource.com/#/c/5431 MOS_MIGRATED_REVID=133010705
* Add repository parameter to source artifact resolverGravatar Kristina Chodorow2016-09-09
| | | | | | | Needed for #1262. Doesn't do anything, yet, other than make the CL smaller. -- MOS_MIGRATED_REVID=132671036
* Add an "is main repo" field to RootsGravatar Kristina Chodorow2016-09-09
| | | | | | | This is part of prepping for #1262. -- MOS_MIGRATED_REVID=132553178
* Refactoring getTimeoutSeconds of a Spawn into Spaws.java, becaused it is usedGravatar Googler2016-09-08
| | | | | | | in places other than the sandbox code. -- MOS_MIGRATED_REVID=132436150
* ResourceManager shouldn't set threadLocked to true if resource acquisition ↵Gravatar Philipp Wollermann2016-08-31
| | | | | | | got interrupted. -- MOS_MIGRATED_REVID=131703083
* Some little fixes to ResourceManager.Gravatar Philipp Wollermann2016-08-29
| | | | | | | | - Make sure that empty ResourceSets are always == ResourceSet.ZERO and use that for easier comparison. - No longer allow nested resource acquisition, because it may lead to deadlocks. -- MOS_MIGRATED_REVID=131567446
* Fix resource leakage on interrupt in ResourceManager identified by philwo.Gravatar Janak Ramakrishnan2016-08-27
| | | | | | | On interrupt, we never released any resources that we had asked to acquire, even though those resources would eventually be acquired. -- MOS_MIGRATED_REVID=131431321
* Make SpawnActions honor the client environmentGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | | | | | ...for the variables that supposed to be inherited from it. Note That with this patch, we take the correct variables, but do not yet track the dependency on changes to the client environment; this will happen in a follow up patches. Also add a test that demonstrates that the client environment rather than that at startup is taken. -- Change-Id: I4d33efa8eaf4f8b689c9b7f2130f71309f3343f0 Reviewed-on: https://bazel-review.googlesource.com/#/c/5392 MOS_MIGRATED_REVID=131406356
* --Gravatar Philipp Wollermann2016-08-26
| | | | MOS_MIGRATED_REVID=131383292
* Add client environment to ActionExecutionContextGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | As the execution of an action now also depends on the client environment, make the latter part of the ActionExecutionContext, so that enough context is provided to actually execute an action. -- Change-Id: Ida7bf407ef0c0375728faba92494bfd47dcbaeb8 Reviewed-on: https://bazel-review.googlesource.com/#/c/5391 MOS_MIGRATED_REVID=131377490
* Add correct debugging information about primary output to action conflict ↵Gravatar Janak Ramakrishnan2016-08-25
| | | | | | | message (we expect inputs to be shared, but not outputs). -- MOS_MIGRATED_REVID=131299517
* Remove ArtifactFactory dependency on incorrect exec rootGravatar Kristina Chodorow2016-08-25
| | | | | | | | | | | Somewhat trickily, this changes the execRoot field from referring to [output_base]/execroot/wsname (not really the exec root) to [output_base]/execroot (actually the execroot). Progress on #1681. -- MOS_MIGRATED_REVID=131286181
* Action#discoverInputs returns an Iterable<Artifact> instead of aGravatar Cal Peyser2016-08-25
| | | | | | | Collection<Artifact> -- MOS_MIGRATED_REVID=131285541
* Add information about the key of conflicting actions to the error message in ↵Gravatar Lukacs Berki2016-08-25
| | | | | | | an effort to track down a spurious ActionConflictException. -- MOS_MIGRATED_REVID=131265803
* Add more debugging info in case of action conflicts. This will tell us if ↵Gravatar Janak Ramakrishnan2016-08-25
| | | | | | | we're unwittingly creating duplicate ConfiguredTargetKey objects, as well as duplicate artifacts. -- MOS_MIGRATED_REVID=131220032
* Extend Action interface by client variablesGravatar Klaus Aehlig2016-08-24
| | | | | | | | | | | | | | | | As per our design on [Specifying environment variables](http://bazel.io/designs/2016/06/21/environment.html), actions may depend, in a controlled way, on the environment in which the Bazel client is invoked. Those environment variables are considered essential for the action, in the sense that it was to be repeated if either of them changes their value (note that other variables in client environment may well change without invalidating actions). Therefore, make the variables that need to be taken from the client environment part of the meta data for actions. -- Change-Id: I2ff6cf40b4ce8e0fea5c7e464f5f3b3e693025ac Reviewed-on: https://bazel-review.googlesource.com/#/c/5390 MOS_MIGRATED_REVID=131150211
* Make Digest (renamed Md5Digest) a little more multi-purpose.Gravatar Shreya Bhattarai2016-08-23
| | | | | -- MOS_MIGRATED_REVID=130986194
* Allow Skyframe graph lookups and value retrievals to throw InterruptedException.Gravatar Janak Ramakrishnan2016-08-16
| | | | | | | The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer. -- MOS_MIGRATED_REVID=130327770
* Allow local spawns to add custom execution info.Gravatar Eric Fellheimer2016-08-12
| | | | | -- MOS_MIGRATED_REVID=129994187
* Drive-by cleanup to remove unnecessary function from the ActionCache interface.Gravatar Shreya Bhattarai2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129753109
* Rephrase tests so that they can be shared between objc_library andGravatar Cal Peyser2016-08-10
| | | | | | | | | | | experimental_objc_library. Do this by introducing CommandAction, which contains the common interface of SpawnAction and CppCompileAction needed for testing. This change will allow compilation, linking, and archiving tests to be copied over into the experimental tests. -- MOS_MIGRATED_REVID=129749930
* Avoid unnecessarily nesting FilesetTraversalParams if the nesting adds no ↵Gravatar Janak Ramakrishnan2016-08-02
| | | | | | | information. -- MOS_MIGRATED_REVID=129012839
* Add hashCode(), equals(), and basic toString() to FilesetTraversalParams ↵Gravatar Janak Ramakrishnan2016-08-02
| | | | | | | classes, and mark traversals fields as nullable. -- MOS_MIGRATED_REVID=129010094
* StandaloneTestStrategy: Pass relative JAVA_RUNFILES and PYTHON_RUNFILES to testsGravatar Yue Gan2016-08-01
| | | | | | | -- Change-Id: I97319dc2c676100fb8f1224b9dcd6fbc8ec7e5e5 Reviewed-on: https://bazel-review.googlesource.com/#/c/4200/3 MOS_MIGRATED_REVID=128973499
* Rename some PackageId and RepositoryName fields/methods in prep for deep ↵Gravatar Kristina Chodorow2016-07-28
| | | | | | | | | | | | | execroot change This is in prep for making the execution root path for external repositories ../repo_name (instead of external/repo_name). Right now, the getRunfilesPath() returns that path, so that is renamed getExecRoot() (since the runfiles are really just a reflection of the execRoot structure). getSourceRoot() replaces getPathFragment, which has always been a confusing name (it's not clear from the name what the difference is between it and getPackageFragment()). It returns the relative path to source files for external repositories (external/repo_name). Also renamed/moved to more sensible class a few static RepositoryName fields. -- MOS_MIGRATED_REVID=128594419
* Experimental java annotation support with unpredictable action ↵Gravatar Rumou Duan2016-07-28
| | | | | | | | | inputs/outputs in j2objc_library behind flag --experimental_j2objc_annotation_processing Also added flag --experimental_zip_tree_artifact to switch on and off the zipping implementation of tree artifact generation. -- MOS_MIGRATED_REVID=128586669
* Use byte[] rather than ByteString for file digests.Gravatar Googler2016-07-20
| | | | | | | | | | | | | | | | | ActionInputFileCache: Change getDigest() to return the underlying byte[16] owned by each FileArtifactValue. Remove throws clause from getInputFromDigest(); this should be an in-memory operation, and no implementation actually throws. PerActionFileCache: Invert mapping from artifact to digest only if needed. Remove interner, as it was used only for the reverse map keys, not the returned values. This should be a significant cpu savings as eagerly constructing the reverse maps was a noticeable hotspot. -- MOS_MIGRATED_REVID=127972359
* --Gravatar Luis Fernando Pino Duque2016-07-20
| | | | MOS_MIGRATED_REVID=127927495
* Don't treat empty files specially with respect to mtime/digest.Gravatar Janak Ramakrishnan2016-07-14
| | | | | | | RELNOTES: Bazel no longer regards an empty file as changed if its mtime has changed. -- MOS_MIGRATED_REVID=127328552
* Rephrase Fingerprint in terms of guava HashFunction.Gravatar Eric Fellheimer2016-07-12
| | | | | | | This minimizes API divergence and allows us to make use of performance enhancements in guava, such as https://github.com/google/guava/issues/1197. -- MOS_MIGRATED_REVID=127108107
* Micro-optimizations to Digest.fromMetadata():Gravatar Googler2016-07-07
| | | | | | | | | | | | Don't encode paths as UTF-8 to md5sum them (the map keys are Strings derived from Paths, for which Fingerprint.addPath() takes the same shortcut). Remove defensive copy from the constructor (which did not need to be public). Remove redundant call to Fingerprint.reset(). -- MOS_MIGRATED_REVID=126682477
* Rename the property io.bazel.UnixFileSystem to io.bazel.EnableJni because ↵Gravatar Lukacs Berki2016-07-01
| | | | | | | | | that's what it does. In particular, it affects Windows. -- MOS_MIGRATED_REVID=126293339
* Reorganize Skylark Reference documentation.Gravatar Dmitry Lomov2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126081020
* Add some docs on what rules and files areGravatar Kristina Chodorow2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125449364
* experimental UI: also report the strategy of running actionsGravatar Klaus Aehlig2016-06-20
| | | | | | | | | | In the experimental UI, for the running actions also report their strategy. This will give a more complete picture of what Bazel is currently doing. -- Change-Id: I9553c952ed494e0db225b2a1ae5e8eba00f68617 Reviewed-on: https://bazel-review.googlesource.com/#/c/3820 MOS_MIGRATED_REVID=125162808
* Rollback of commit bdfd58a8ca2ed5735d6aaa5b238fb0f689515724.Gravatar Laurent Le Brun2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125160288
* Make the execution root match the runfiles tree structure for external ↵Gravatar Kristina Chodorow2016-06-17
| | | | | | | | | | | | | | | | | | | | | repositories One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. -- MOS_MIGRATED_REVID=125095799
* Description redacted.Gravatar Googler2016-06-16
| | | | | -- MOS_MIGRATED_REVID=125013752
* Update Skyframe builder to return exit code based on reported error map, whenGravatar Googler2016-06-16
| | | | | | | | | | | keep_going is turned on Current implementation only supports custom exit code from {@link ActionExecutionException} in fail-fast mode. This change allows appropriate error code to be returned based on all reported errors during build phase. -- MOS_MIGRATED_REVID=124987173
* Don't keep the full java.util.HashMap produced when checking for conflictingGravatar Googler2016-06-07
| | | | | | | actions; most of these have exactly one entry, and we never mutate them again. -- MOS_MIGRATED_REVID=124243817
* Add --experimental_multi_threaded_digest which lets DigestUtils use multiple ↵Gravatar Philipp Wollermann2016-06-06
| | | | | | | | | threads when calculating the MD5 hash even for large files. Might improve performance when using an SSD. Fixes #835 and #1210. -- MOS_MIGRATED_REVID=124128233
* Clarify that input/output names should be in cache key.Gravatar Janak Ramakrishnan2016-06-01
| | | | | -- MOS_MIGRATED_REVID=123729693
* Replace Constants.PRODUCT_NAME with a startup option --product_name=bazel and Gravatar Luis Fernando Pino Duque2016-05-31
| | | | | | | | | | | (finally) delete Constants.java. For bazel the file Constants.java is the only source of src/main/java/com/google/devtools/build/lib:common and since it was exporting guava then many dependencies needed to be fixed. -- MOS_MIGRATED_REVID=123648270
* Update JavaDoc for class Artifact.Gravatar Rumou Duan2016-05-16
| | | | | -- MOS_MIGRATED_REVID=122261549
* Introducing SpawnActionTemplate, a stub action for TreeArtifacts at analysis ↵Gravatar Rumou Duan2016-05-12
| | | | | | | time that can expand into a list of SpawnActions operating on associated TreeFileArtifacts inside TreeArtifacts at execution time. -- MOS_MIGRATED_REVID=122056131
* Use runfiles path, not execroot path, for Skylark's short_pathGravatar Kristina Chodorow2016-05-11
| | | | | | | Will help with fixing #1233. -- MOS_MIGRATED_REVID=121993946
* Move methods getRunfilesSuppliers, inputsKnown and discoversInputs fromGravatar Rumou Duan2016-05-11
| | | | | | | | | | ActionAnalysisMetadata to ActionExecutionMetadata. They are not called in analysis phase. RELNOTES:None. -- MOS_MIGRATED_REVID=121976260
* Switch to using ../repo-name syntax for runfilesGravatar Kristina Chodorow2016-05-04
| | | | | -- MOS_MIGRATED_REVID=121475668