aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Add LabelLateBoundDefault to :coverage_report_generator attributeGravatar dbabkin2018-06-05
| | | | | RELNOTES:none PiperOrigin-RevId: 199280443
* Add LabelLateBoundDefault to :coverage_support attributeGravatar dbabkin2018-06-05
| | | | | RELNOTES:none PiperOrigin-RevId: 199256705
* Let Skylark rules take part in MakeVariableExpandingRule expansions using theGravatar jcater2018-06-04
| | | | | | toolchains attribute. PiperOrigin-RevId: 199133235
* Make tools in action inputs an error.Gravatar tomlu2018-06-02
| | | | | | | | | | Supporting tools in inputs introduces a slow linear scan. Such tools should be moved to the 'tools' attribute. If --incompatible_no_support_tools_in_action_inputs is set the inputs are scanned, but a helpful error message is issued to the user. Eventually we will remove the slow scanning. Errors will surface in the execution phase instead of during analysis, and the resulting error messages will be less obvious. RELNOTES: None RELNOTES[INC]: With --incompatible_no_support_tools_in_action_inputs enabled, Skylark action inputs are no longer scanned for tools. Move any such inputs to the newly introduced 'tools' attribute. PiperOrigin-RevId: 198996093
* Allow multiple trimming transition factories to be added.Gravatar mstaib2018-06-01
| | | | | | | | If multiple trimming transition factories are added, they are composed in the order they were added. RELNOTES: None. PiperOrigin-RevId: 198934666
* Create a Bootstrap for config-related libraries of skylarkbuildapi.Gravatar cparsons2018-06-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 198906931
* Move TARGET_CPU from the CcToolchainProvider to BuildConfiguration.Gravatar jcater2018-06-01
| | | | PiperOrigin-RevId: 198877280
* Migrate test-related skylark API to skylarkbuildapiGravatar cparsons2018-05-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 198728350
* Open up visibility of BuildConfiguration$OutputDirectory for serialization ↵Gravatar janakr2018-05-31
| | | | | | and remove unused repositoryName field from BuildConfiguration. PiperOrigin-RevId: 198723339
* Fix `equals()` and `hashCode()` for artifacts: artifacts of different ↵Gravatar Dmitry Lomov2018-05-30
| | | | | | | | | | | | | classes are not equal. Also validate that there are no tree and file artifacts with the same exec path. Fixes #4668. Closes #5284. Change-Id: Id97c0407a476a5bfc697b4ca7b858e3d0c0f8c75 PiperOrigin-RevId: 198540425
* Automated rollback of commit 7fcbc8ffdead028d19606fefa2fa3be13781da98.Gravatar laszlocsomor2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** According to a post-submit regression test, this commit increased Bazel's memory usage slightly beyond some threshold. That event prompted me to consider and question the necessity of this commit. My goal is to make Bazel work on Windows without requiring MSYS, failing the build only if an action is a shell action. Toolchainifying the shell is related to, but not required by this effort. What is required is to fail the build when Bazel tries to create a shell action but the shell is missing, and we have that already with ShToolchain.getPath (which only considers the ShellConfiguration fragment). What's missing for my goal is to reimplement hardcoded shell actions (i.e. SpawnAction.builder().setShellCommand(...)) without using the shell where possible. *** Original change description *** shell toolchain: genrule now uses it genrule() now uses the shell toolchain (as well as the ShellConfiguration config fragment) to look up the shell interpreter's path. Also the CommandHelper no longer looks up the shell interpreter's path itself. Instead its ctor takes the path as an argument. This allows supporting rules that already use the shell toolchain and rules that still only consider the configuration fragment. With these changes genrule() is now able to use the shell interpreter registered as a toolchain, even if there's no `--shell_executable` flag specified (or its value is empty). Subsequent commits will migrate more and more rules to depend on the shell toolchain. This commit takes us closer to: 1. be able to detect the local shell interpreter's location, especially when it's not the default /bin/bash 2. be able to define different shell toolchains (different interpreter paths) for remote builds 3. gracefully fail the build if the machine has no shell installed but the action graph included a shell action See https://github.com/bazelbuild/bazel/issues/4319 Change-Id: I0674c7e2d5917643d87b48b19a1cb43e606ad2f7 Closes #5282. *** RELNOTES: none PiperOrigin-RevId: 198527351
* Merge ComposingSplitTransition and ComposingPatchTransition.Gravatar gregce2018-05-29
| | | | | | Part of https://docs.google.com/document/d/1_UJKmAQ9EE8i3Pl0il3YLTYr-Q9EKYYyLatt2zohfyM/edit# PiperOrigin-RevId: 198420365
* shell toolchain: genrule now uses itGravatar Laszlo Csomor2018-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | genrule() now uses the shell toolchain (as well as the ShellConfiguration config fragment) to look up the shell interpreter's path. Also the CommandHelper no longer looks up the shell interpreter's path itself. Instead its ctor takes the path as an argument. This allows supporting rules that already use the shell toolchain and rules that still only consider the configuration fragment. With these changes genrule() is now able to use the shell interpreter registered as a toolchain, even if there's no `--shell_executable` flag specified (or its value is empty). Subsequent commits will migrate more and more rules to depend on the shell toolchain. This commit takes us closer to: 1. be able to detect the local shell interpreter's location, especially when it's not the default /bin/bash 2. be able to define different shell toolchains (different interpreter paths) for remote builds 3. gracefully fail the build if the machine has no shell installed but the action graph included a shell action See https://github.com/bazelbuild/bazel/issues/4319 Change-Id: I0674c7e2d5917643d87b48b19a1cb43e606ad2f7 Closes #5282. Change-Id: I0674c7e2d5917643d87b48b19a1cb43e606ad2f7 PiperOrigin-RevId: 198394021
* Refactor root cause reporting in ConfiguredTargetFunctionGravatar ulfjack2018-05-29
| | | | | | We now track Causes instead of plain Labels, which will allow us to do better reporting in the future. Add basic tests. PiperOrigin-RevId: 198380468
* Add flags to help enforce that android_local_test does not depend directly ↵Gravatar tomlu2018-05-28
| | | | | | | on a proto_library. RELNOTES: None PiperOrigin-RevId: 198304295
* Remove the unused TestRunnerAction.useTestRunner attribute.Gravatar lberki2018-05-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 198302692
* CommandHelper: do not look up shell's pathGravatar Laszlo Csomor2018-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CommandHelper no longer looks up the shell interpreter's path itself. Instead its ctor takes the path as an argument. This change will allow incrementally migrating rules that use CommandHelper to start depending on the shell toolchain. Shell-using rules today only use the ShellConfiguration config fragment to look up the shell's path. In the future, more and more rules will also retrieve the active shell toolchain, and be able to: 1. use the auto-detected local shell interpreter's location, especially when it's not the default /bin/bash 2. use define different shell toolchains (different interpreter paths) for remote builds 3. gracefully fail the build if the machine has no shell installed but the action graph included a shell action See https://github.com/bazelbuild/bazel/issues/4319 Change-Id: I4da4e77e7d1fe57e8e4f5eb8820d03a840915e20 Closes #5283. Change-Id: I4da4e77e7d1fe57e8e4f5eb8820d03a840915e20 PiperOrigin-RevId: 198298315
* Skylark: Exposes disabled features from rule context to SkylarkGravatar plf2018-05-28
| | | | | | WANT_LGTM=all RELNOTES:none PiperOrigin-RevId: 198269370
* Remove accidentally-leftover @SkylarkCallable methods in FilesToRunProviderGravatar cparsons2018-05-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 198126134
* Migrate FilesToRunProvider, Target, and TemplateVariableInfo to skylarkbuildapiGravatar cparsons2018-05-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 198095817
* Skylark: Make 'cfg = "data"' a noop.Gravatar gregce2018-05-25
| | | | | | | This is no longer meaningful with the turndown of (C++) LIPO. PiperOrigin-RevId: 198092974
* Migrate platform-related skylark objects to skylarkbuildapiGravatar cparsons2018-05-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 198086078
* Remove attribute read checks expecting a DATA transition.Gravatar gregce2018-05-25
| | | | | | | | | | | | | | This is a precursor to removing the DATA transition outright. While we could also have changed the Mode.DATA instances to Mode.TARGET (which would declare that we expect the attribute not to apply any transition), that would break existing definitions and make depot cleanup more delicate. Plus, these checks weren't being consistently applied across attributes anyway so they don't really offer much. A lot of this logic is really just leftover legacy from the pre-dynamic configuration days. PiperOrigin-RevId: 198085059
* Provide ability to inject custom ConstraintSemantics behavior.Gravatar gregce2018-05-25
| | | | PiperOrigin-RevId: 198053509
* Clarify invariants for @SkylarkModule and @SkylarkCallableGravatar brandjon2018-05-24
| | | | | | | Also refactor away SkylarkModule.Resolver. RELNOTES: None PiperOrigin-RevId: 197955164
* Migrate OutputGroupInfo to skylarkbuildapiGravatar cparsons2018-05-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 197949354
* Fix SkylarkCallable-annotation detection to appropriately handle methods ↵Gravatar cparsons2018-05-24
| | | | | | | with generic parameters RELNOTES: None. PiperOrigin-RevId: 197932265
* Migrate struct() to skylarkbuildapiGravatar cparsons2018-05-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 197915097
* Unfork SplitTransition / PatchTransition invocations.Gravatar gregce2018-05-24
| | | | | | Part of https://docs.google.com/document/d/1_UJKmAQ9EE8i3Pl0il3YLTYr-Q9EKYYyLatt2zohfyM/edit# PiperOrigin-RevId: 197890685
* Expose FileProvider in skylarkbuildapiGravatar asteinb2018-05-24
| | | | | | | | | | | The Android data Skylark API includes references to FileProvider. To move that API to the skylarkbuildapi, we must first move this provider. For more information about this migration, see https://docs.google.com/document/d/1UDEpjP_qWQRYsPRvx7TOsdB8J4o5khfhzGcWplW7zzI/ RELNOTES: none PiperOrigin-RevId: 197882296
* Refactor analysis failure reporting, report loading failuresGravatar ulfjack2018-05-24
| | | | | | | | Split the AnalysisFailureEvent into a legacy and a new variant; always post an AnalysisFailureEvent, even if the legacy variant is not posted - this gives us some coverage for loading failures. PiperOrigin-RevId: 197862257
* Make BuildOptions$OptionsDiffForReconstruction deterministic in its ↵Gravatar janakr2018-05-23
| | | | | | construction. Also restrict visibility of some test-only OptionsDiff methods, and remove a server-specific part of the ConfiguredTargetKey #toString representation. PiperOrigin-RevId: 197830577
* Make the SplitTransition, PatchTransition interfaces more compatible.Gravatar gregce2018-05-23
| | | | | | Part of https://docs.google.com/document/d/1_UJKmAQ9EE8i3Pl0il3YLTYr-Q9EKYYyLatt2zohfyM/edit# PiperOrigin-RevId: 197800831
* Simplify split transition semantics: noops now return the input build options.Gravatar gregce2018-05-23
| | | | | | This results in less special logic in the implementation and a simpler API. PiperOrigin-RevId: 197772283
* Initial implementation of a Skylark debug server API.Gravatar Googler2018-05-23
| | | | | | | | | | | | | | | | | | I've pulled out the API for separate review. It includes all hooks from blaze/skylark used by the debugger. Debuggable thread contexts are currently declared in 3 places: - BuildFileAST (top-level evaluation of BUILD files) - SkylarkRuleConfiguredTargetUtil (rules) - SkylarkAspectFactory (aspects) The purpose of declaring these contexts is so that the debugger can track currently-active threads (and stop tracking them when the task is completed). Details of the actual debugging server are in unknown commit. PiperOrigin-RevId: 197770547
* Rename PatchTransition.apply to PatchTransiton.patch.Gravatar gregce2018-05-23
| | | | | | | This unclashes with the incoming ConfigurationTransition.apply method described in https://docs.google.com/document/d/1_UJKmAQ9EE8i3Pl0il3YLTYr-Q9EKYYyLatt2zohfyM/edit#heading=h.96gongkwg852. PiperOrigin-RevId: 197769784
* Create GlobalBootstrap and the Bootstrap interface to add portions of the ↵Gravatar cparsons2018-05-23
| | | | | | | build API to a global environment. RELNOTES: None. PiperOrigin-RevId: 197742427
* Call the AbstractAction constructor that takes an action environmentGravatar ulfjack2018-05-23
| | | | | | | | | | This is in preparation for removing the AbstractAction constructors that do not accept an action environment (with the exception of the first one, which is intended for use by actions which don't need an environment at all, e.g., file write actions). SKIP_CI=Flaky windows test (see #5242) PiperOrigin-RevId: 197701713
* Get ConfiguredTargetAndData out of TargetCompleteEvent.Gravatar janakr2018-05-22
| | | | | | Having it in there makes serializing events harder. PiperOrigin-RevId: 197648233
* Stop setting deprecated target_kind and test_size fields in TargetComplete ↵Gravatar janakr2018-05-22
| | | | | | | | message in build_event_stream.proto. This gets in the way of serializing TargetCompleteEvent. PiperOrigin-RevId: 197630444
* Migrate JavaInfo's provider to use the new provider pattern.Gravatar cparsons2018-05-22
| | | | | | | This dramatically improves documentation generation for JavaInfo and it makes it far more maintainable and extensible going forward. RELNOTES: None. PiperOrigin-RevId: 197619040
* Create source-only manifests remotely when possible.Gravatar felly2018-05-22
| | | | | RELNOTES: None PiperOrigin-RevId: 197578417
* 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
* Add BuildEventProtocolOptions; use to enable/disable important_outputsGravatar ulfjack2018-05-18
| | | | | | | The important_outputs field is deprecated, and this adds a flag to disable its generation entirely. PiperOrigin-RevId: 197186530
* Fork RuleContext.ErrorReporter to create a Skylark-friendly RuleErrorConsumerGravatar asteinb2018-05-18
| | | | | | | | | | | | | | The new error consumer is simple to create from @SkylarkCallable methods, so we won't need to pass SkylarkRuleContext into those methods for that reason anymore. Create a new abstract class, rather than expand the existing AbstractRuleErrorConsumer class, since the latter is already being extended and used in a variety of tests, and I prefer not to have to migrate all of them as needed. Add Javadoc to make clear that this class should not be used similarly. RELNOTES: none PiperOrigin-RevId: 197148849
* Move coverageSupport and coverageReportGenerator from BuildConfiguration toGravatar dbabkin2018-05-18
| | | | | | | TestConfiguration. RELNOTES:none PiperOrigin-RevId: 197135911
* 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
* Remove RuleErrorException from RuleConfiguredTargetBuilder.build signature.Gravatar dbabkin2018-05-18
| | | | | RELNOTES:none PiperOrigin-RevId: 197117392