aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/actions
Commit message (Collapse)AuthorAge
* Track Fileset in artifact expansion.Gravatar felly2018-08-13
| | | | PiperOrigin-RevId: 208549418
* Keep track of tree artifact inputs in CustomCommandLine.Builder .Gravatar Googler2018-07-26
| | | | PiperOrigin-RevId: 206203357
* Use the single-string arg formatter for param file format.Gravatar tomlu2018-07-25
| | | | | | | This avoids bazel crashes for illegally formatted strings. Previously the code would assume that a correct string was passed with only minimal validation. RELNOTES: None PiperOrigin-RevId: 206012819
* PiperOrigin-RevId: 203687257Gravatar Googler2018-07-08
|
* Bazel server: ensure InputStreams are closedGravatar laszlocsomor2018-07-05
| | | | | | | | | | | | | | | | | | | Use try-with-resources to ensure InputStreams that we open via FileSystem.InputStream(path) are closed. Eagerly closing InputStreams avoids hanging on to file handles until the garbage collector finalizes the InputStream, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203338148
* Refactor TemplateExpansionAction so that various strategies can be used to ↵Gravatar kush2018-06-29
| | | | | | | | | implement it. Also clarify the behavior of the expand_template API in the presence of multiple-substitutions. RELNOTES: None PiperOrigin-RevId: 202719656
* Remove special handling of SpawnActionContext in Executor/ActionExecContextGravatar ulfjack2018-05-22
| | | | | | | | Instead, internally look up the correct context by mnemonic. This simplifies all the callers. We still need a little bit of special casing when constructing the action context map. PiperOrigin-RevId: 197572357
* Pass AndroidDataContext through manifest processing methodsGravatar asteinb2018-05-22
| | | | | | | | | | | | | | | Manifest processing methods are particularly messy for this migration, since the old ApplicationManifest class is still around. Anyway, pass around AndroidDataContext instead of RuleContext everywhere we can. Note that the built-in expander does not seem able to be modified to support decoupling attributes and other information, and thus really can't be done once we get rid of RuleContext. Instead, for Skylark rules, document that expansion must happen outside of the Android data Skylark method calls (for example, for manifest_values and nocompress_extensions). RELNOTES: none PiperOrigin-RevId: 197567541
* Make SymlinkTreeAction properly use the configuration's environmentGravatar ulfjack2018-05-22
| | | | | | | | In particular, fix its use of client make variables. Fixes #4750. PiperOrigin-RevId: 197545415
* Changing SymlinkTreeStrategy not to use spawns.Gravatar Googler2018-05-18
| | | | | RELNOTES: An internal action for symlinking runfiles will use Command instead of a Spawns. This should have no functional chages; the only user visible consequence should be that the internal action is no longer be included in statistics when calculating processes count. PiperOrigin-RevId: 197131917
* Expose RuleContext methods in ActionConstructionContextGravatar asteinb2018-05-17
| | | | | | | | | | | | | - Common methods for creating artifacts - Convenience method for registering action Also, create a new getUniqueDirectoryArtifact method that doesn't require a root directory to be passed in - every call I've seen to getUniqueDirectoryArtifact always uses RuleContext#getBinOrGenfilesDirectory ffor this value. RELNOTES: none PiperOrigin-RevId: 196993195
* Rename CommandAction.getEnvironment, add AbstractAction.getEnvironmentGravatar ulfjack2018-05-17
| | | | | | | | | | | | | | | This is a cleanup to clarify the code. 1. The getEnvironment method in the CommandAction interface does not have access to the clientEnv, so it's return value is necessarily incomplete. Rename to getIncompleteEnvironmentForTesting. 2. Add a final getEnvironment method to AbstractAction, which returns the ActionEnvironment, which is intended to be a complete description of the intended final environment of the action (technically, of any spawn running within the action). This is not currently used, but is provided to prevent action subclasses to add such a method (it may be used in the future). PiperOrigin-RevId: 196991091
* Fix Cpp{Compile,Link}Action environment and cache key computationGravatar ulfjack2018-05-17
| | | | | | | | | | These were previously ignoring the inhertied environment, i.e., --action_env=PATH did _not_ result in the PATH variable being forwarded from the client environment. Fixes #5142. PiperOrigin-RevId: 196966822
* Slightly refactor SpawnAction to improve env handlingGravatar ulfjack2018-05-15
| | | | | | | This is in preparation for fixing env handling as well as cache key (to use env) computations in subclasses of SpawnAction. PiperOrigin-RevId: 196626495
* Remove dead code from SpawnActionGravatar kush2018-05-03
| | | | | RELNOTES: None PiperOrigin-RevId: 195264146
* Use the in-memory metadata in blaze as the source of truth for Fileset mappingsGravatar kush2018-05-02
| | | | | | | instead of the manifest files. RELNOTES: None PiperOrigin-RevId: 195149880
* Update test code to support finding deferred param files.Gravatar tomlu2018-05-02
| | | | | RELNOTES: None PiperOrigin-RevId: 195072243
* Remove unused methods.Gravatar tomlu2018-05-02
| | | | | RELNOTES: None PiperOrigin-RevId: 195055827
* Migrate AbstractAction and SkylarkActionFactory to buildapiGravatar cparsons2018-05-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 195011200
* Normalize parameter name commentsGravatar cushon2018-04-27
| | | | PiperOrigin-RevId: 194512971
* Prepare to abstract away the param file write action from tests.Gravatar tomlu2018-04-26
| | | | | | | | | Rule authors frequently wants to make assertions on the parameter files their rule implementations have created. However, if they do not explicitly create parameter file write actions, or if indeed _there aren't_ any parameter file write actions inserted into the action graph, the tests will fail. This CL adds necessary methods for the migration. RELNOTES: None PiperOrigin-RevId: 194379748
* Support deferred param files.Gravatar tomlu2018-04-25
| | | | | | | | | | | | | Design doc: https://docs.google.com/document/d/1JXqwwVHYosZOgmjN8xrfTalyhiUYJ99Qe2D0qBcqZ1c The behaviour is gated on --defer_param_files (default off) and is controlled by --min_param_file_size. This CL adds support for VirtualActionInputs to LocalSpawnRunner, and all remote runners already supports them. The sandboxed runners are not yet supported, but that can be added in a future CL. This CL does not add support for spawn runner using different param file limits. This will require refactoring of the spawn strategies and runners to be viable. RELNOTES: None PiperOrigin-RevId: 194265291
* SpawnAction.setShellCommand: expect shell pathGravatar laszlocsomor2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | SpawnAction.setShellCommand(String) now expects the shell interpreter's path as an argument. This change enables two things: - rules can report an error if the shell is missing - SpawnAction no longer has to know about a default shell The new ShToolchain class will later also be responsible for retrieving the active shell toolchain (added in https://github.com/bazelbuild/bazel/commit/81ed3add408adb20bddbc3ba1818c65806738dc5). This change brings Bazel closer to not depend on the shell unless it has to (e.g. to run shell scripts). See https://github.com/bazelbuild/bazel/issues/4319 RELNOTES: none PiperOrigin-RevId: 193885943
* Cleanup Artifact.getPath() usage surrounding Fingerprint.Gravatar shahan2018-04-16
| | | | PiperOrigin-RevId: 193130164
* Update format implementation in ctx.actions.args.Gravatar tomlu2018-04-16
| | | | | | | Since we're only supporting a single %s anyway, make this explicit in the docs, fail in the analysis phase, and use a more efficient format method in the implementation. RELNOTES: None PiperOrigin-RevId: 193099585
* Document the new ctx.actions.args() APIGravatar brandjon2018-04-12
| | | | | | RELNOTES: Args objects (ctx.actions.args()) have new methods add_all() and add_joined() for building command lines using depsets. RELNOTES[INC]: Added flag --incompatible_disallow_old_style_args_add to help migrate from args.add() to args.add_all() / args.add_joined() where appropriate. PiperOrigin-RevId: 192633763
* Deletes PopulateTreeArtifactAction (which seems to be dead code).Gravatar shahan2018-04-12
| | | | PiperOrigin-RevId: 192621318
* Starts threading ActionExecutionContext to sites calling getPath() only withinGravatar shahan2018-04-11
| | | | | | Action execution. PiperOrigin-RevId: 192488641
* Add CommandLinesAndParamFiles class.Gravatar tomlu2018-04-11
| | | | | | | | | | | This class is currently unused. In order to keep CL sizes down we introduce this class prior to using it in the spawn runners. This class can manage an action's list of command lines and param files. For instance, SpawnAction will contain one of these instances (instead of keeping a single command line object and adding param file write actions to the action graph). At spawn execution time, the spawn runners will use this class to resolve the list of command lines and param files into a master argument list + some number of param files that need to be written. The local spawn runners can simply write the param files using a helper. In the distributed cases the param files are ready-made VirtualActionInputs that can be added to the Spawn's other inputs. RELNOTES: None PiperOrigin-RevId: 192439501
* Move shell executable to its own configuration fragment.Gravatar lberki2018-04-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 191861074
* Automated rollback of commit 9bfbefc13f2b6ae9a86fd46a8470e3b4cd8efd1a.Gravatar asteinb2018-04-02
| | | | | | | | | | | | | | *** Reason for rollback *** Roll forward with fix and test - turns out I didn't distinguish properly between list and item seperators. *** Original change description *** Rollback "Allow Merge action to take an interface as primary, not just ResourceContainer", as it breaks some android rule integration tests. RELNOTES: none PiperOrigin-RevId: 191322706
* Rollback "Allow Merge action to take an interface as primary, not just ↵Gravatar cparsons2018-04-02
| | | | | | | ResourceContainer", as it breaks some android rule integration tests. RELNOTES: none PiperOrigin-RevId: 191304264
* Allow Merge action to take an interface as primary, not just ResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | | | | | In future reviews, we will use this to be able to pass assets and resources individually. Introduce replacement for ResourceContainerConverter that can handle generics and should be about as flexible. To support that replacement, slightly improve how CustomCommandLine handles generics. RELNOTES: none PiperOrigin-RevId: 190970298
* Simplify Executor.getSpawnActionContext() by removing mnemonic: spawn is enough.Gravatar Googler2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190544948
* Simplified ActionContextConsumer by having it operate on a new class which ↵Gravatar Googler2018-03-26
| | | | | | holds a variety of strategy/context maps. PiperOrigin-RevId: 190491357
* @Autocodec a few leftover classes. Also, add @AutoCodec builder support for ↵Gravatar cpeyser2018-03-20
| | | | | | boolean getters in "isFoo" form. PiperOrigin-RevId: 189753768
* @AutoCodec TemplateExpansionAction. Have to make some anonymous classes ↵Gravatar janakr2018-03-17
| | | | | | concrete. PiperOrigin-RevId: 189467877
* @AutoCodec some expressions that show up in Java configured targets.Gravatar janakr2018-03-16
| | | | PiperOrigin-RevId: 189419493
* Begins cleanup to allow ActionFS to be injected into all action executions.Gravatar shahan2018-03-15
| | | | PiperOrigin-RevId: 189244665
* Expose an actions provider on RuleConfiguredTarget instances.Gravatar cparsons2018-03-06
| | | | | | | | | Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint. Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon. RELNOTES: None. PiperOrigin-RevId: 188098079
* Automated rollback of commit 96145511b34a2d7be834e3eb05927674e875c813.Gravatar janakr2018-03-05
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed issue that led to rollback. RELNOTES: None *** Original change description *** Automated rollback of commit eee53d3a33dde441f7e7adaecde81ef2d3db7c1b. *** Reason for rollback *** breaks Blaze_CorpTest *** Original change description *** @AutoCodec ConfiguredTargetValue. PiperOrigin-RevId: 187869560
* Automated rollback of commit eee53d3a33dde441f7e7adaecde81ef2d3db7c1b.Gravatar dannark2018-03-04
| | | | | | | | | | | | *** Reason for rollback *** breaks Blaze_CorpTest *** Original change description *** @AutoCodec ConfiguredTargetValue. PiperOrigin-RevId: 187783702
* @AutoCodec ConfiguredTargetValue.Gravatar cpeyser2018-03-02
| | | | PiperOrigin-RevId: 187635570
* Make JavaCompileAction and friends emit new-style arguments.Gravatar tomlu2018-03-01
| | | | | | | | | Instead of --direct_dependency, --indirect_dependency args we now emit --direct_dependencies. We no longer need to emit any jar owner information since that is baked into the jar by JavaBuilder. This CL also contains the deletion of CustomMultiArgv and the injecting_rule_kind aspect parameter, as the deleted code was the last remaining usage. RELNOTES: None PiperOrigin-RevId: 187558628
* Refactor the AbstractAction computeKey method to be easier to add invariantsGravatar jcater2018-02-28
| | | | | | for every type of action. PiperOrigin-RevId: 187368369
* Tag ParameterFileWriteAction with @AutoCodec.Gravatar mjhalupka2018-02-27
| | | | | | | | This requires codecs for CustomCommandLine and a Marshaller for Charset. Added AutoCodec functionality to generic classes like Iterable<T>. PiperOrigin-RevId: 187182889
* @AutoCodec FileWriteAction.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187048921
* Apply @AutoCodec to ExecutableSymlinkAction and SymlinkAction.Gravatar mjhalupka2018-02-23
| | | | | | | AbstractAction had getPrimaryInput() and getPrimaryOutput() which is why arguments are renamed. PiperOrigin-RevId: 186795064
* @AutoCodec for GenRuleAction.Gravatar cpeyser2018-02-23
| | | | PiperOrigin-RevId: 186765754
* Add @AutoCodec to SpawnAction. Refactor the SpawnAction API for extra ↵Gravatar cpeyser2018-02-22
| | | | | | actions so that it is non-generic and does not persist a GeneratedExtension, which is hard to serialize. PiperOrigin-RevId: 186627440