aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Remove topLevelConfigurationHook now that LIPO is goneGravatar gregce2018-06-15
| | | | PiperOrigin-RevId: 200801973
* Remove "artifactOwnerConfiguration" now that LIPO is goneGravatar gregce2018-06-15
| | | | PiperOrigin-RevId: 200763653
* Remove LIPO supportGravatar hlopko2018-06-15
| | | | | RELNOTES: Support for LIPO has been fully removed. PiperOrigin-RevId: 200724578
* Move remaining BazelLibrary skylark functions to MethodLibraryGravatar cparsons2018-06-15
| | | | | | | | | Ultimately, we'll need to make the call on whether these functions belong as part of the build API or as part of skylark builtins. For now, we keep them as skylark builtins. (In either case, we'll want to migrate to @SkylarkCallable, but that's for a later change) RELNOTES: None. PiperOrigin-RevId: 200723605
* Add the BuildConfigurationCollection to the AnalysisResultGravatar ulfjack2018-06-15
| | | | | | This is in preparation for interleaving config creation with loading+analysis. PiperOrigin-RevId: 200695071
* Add a mechanism for build event protocol events to upload filesGravatar ulfjack2018-06-15
| | | | | | | | This should be a no-op, mostly replacing PathConverter with BuildEventArtifactUploader, since none of the implementations perform any upload yet. PiperOrigin-RevId: 200685325
* Enable automatic trimming of test configuration when entering non-test rules.Gravatar mstaib2018-06-14
| | | | | | | | | | | | | | Note that this is not sufficient to see caching between builds on its own; currently when any flag changes, the analysis cache is reset. A follow-up will turn off this behavior when only test flags change while trim_test_configuration is on. config_settings which examine test options are treated the same as test rules; that is, they can only be successfully analyzed at the top level or when connected to the top level by an unbroken chain of test rules. RELNOTES: None. PiperOrigin-RevId: 200614584
* Split BuildView into two classesGravatar ulfjack2018-06-14
| | | | | | | Move the testing class to the tests tree. This is in preparation for dismantling BuildView and merging the relevant parts into AnalysisPhaseRunner. PiperOrigin-RevId: 200532794
* Allow Skylark rules to specify whether targets can add execution platform ↵Gravatar John Cater2018-06-14
| | | | | | | | | constraints. Closes #5341. Change-Id: Ib74e59fec48102469a5039e045e3f3d0e0d86d8c PiperOrigin-RevId: 200526448
* When composing RuleTransitionFactories, return something that respects equality.Gravatar mstaib2018-06-13
| | | | | | | | | | | | If the output from composeTransitions is one of the input PatchTransitions, return it. If it's a composed transition, make sure to wrap it in a class which respects equality. Without this change, running the same RuleTransitionFactory on the same attribute and target twice will produce two non-equal Dependencies which can't be deduplicated by OrderedSetMultimap - no lambda is equal to any other instance of the same lambda. RELNOTES: None. PiperOrigin-RevId: 200472777
* Fix filterTestsByTarget to filter by label instead of filtering by doingGravatar mjhalupka2018-06-13
| | | | | | package lookups to get Targets. PiperOrigin-RevId: 200452642
* Enable per-target execution for genrule, sh_*, and *_test.Gravatar jcater2018-06-13
| | | | PiperOrigin-RevId: 200410988
* Add documentation on platform flags to the user manual.Gravatar jcater2018-06-13
| | | | PiperOrigin-RevId: 200410790
* Move BuildView.Options to a new top-level classGravatar ulfjack2018-06-13
| | | | | | | This is in preparation for dismantling BuildView and merging the relevant parts into AnalysisPhaseRunner. PiperOrigin-RevId: 200391088
* Split AnalysisResult into a top-level classGravatar ulfjack2018-06-13
| | | | PiperOrigin-RevId: 200363345
* Add more data to the exception thrown when putOnlyEntry's verification fails.Gravatar mstaib2018-06-12
| | | | | | | | | If this exception is thrown, performance no longer matters - we're detonating the place and riding the explosion out to stderr. So we might as well just dump everything we know. RELNOTES: None. PiperOrigin-RevId: 200290439
* Change WorkspaceStatusAction incrementality logic. We no longer manually ↵Gravatar janakr2018-06-12
| | | | | | | | invalidate the BUILD_INFO_KEY node on --workspace_status_command and related flag changes. Instead, the action has a supplier that allows it to retrieve the correct values at execution time. This does not sacrifice correctness because the action executes unconditionally on every build, so it will never have stale data. PiperOrigin-RevId: 200265375
* Remap repository names inside load statements in BUILD files if the ↵Gravatar dannark2018-06-12
| | | | | | | | | | | | | | | | | | | repository name is remapped. For example if main/WORKSPACE contains: local_repository( name = "a", path = "../a", repo_mapping = {"@x" : "@y"}, ) a/BUILD load("@x//:sample.bzl", "sample") Then the load in a/BUILD will be resolved as "@y//:sample.bzl" RELNOTES: None PiperOrigin-RevId: 200227431
* Migrate remaining assorted skylark types to skylarkbuildapiGravatar cparsons2018-06-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 200100871
* Migrate android providers to use BuiltinProvider instead of NativeProviderGravatar cparsons2018-06-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 200096226
* Create a bootstrap for repository-related skylark build API.Gravatar cparsons2018-06-11
| | | | | | | Also remove the old ConfiguredRuleClassProvider.addSkylarkModule() method, as it, after this change, has no callers. RELNOTES: None. PiperOrigin-RevId: 200078816
* Unify path resolution codepaths.Gravatar felly2018-06-08
| | | | | RELNOTES: None PiperOrigin-RevId: 199880252
* Support basic test functionality in ActionFS.Gravatar felly2018-06-08
| | | | | | | | | ActionFS now allows output files to be created that do not correspond to known Artifacts. Note that tests exercise a greater gamut of filesystem functionality (deleting files, deleting directory trees, moving files, etc.) RELNOTES: None PiperOrigin-RevId: 199809069
* Add LabelLateBoundDefault to :coverage_report_generator attributeGravatar dbabkin2018-06-07
| | | | | RELNOTES:none PiperOrigin-RevId: 199619691
* Add LabelLateBoundDefault to :coverage_support attributeGravatar dbabkin2018-06-07
| | | | | RELNOTES:none PiperOrigin-RevId: 199604462
* Remove a pointless nested set expansion.Gravatar Benjamin Peterson2018-06-06
| | | | | | | | | Change-Id: Icdabf559303bfac459e1a88ff44ca95298574361 Closes #5333. Change-Id: Icdabf559303bfac459e1a88ff44ca95298574361 PiperOrigin-RevId: 199527673
* Automated rollback of commit 1b041c86147098451bffc94d2602aea26ee16e06.Gravatar juliexxia2018-06-05
| | | | | | | | | | | | | *** Reason for rollback *** http://b/109733929 This CL breaks Blaze_CorpTest which must pass for Blaze's nightly candidate to form *** Original change description *** Add LabelLateBoundDefault to :coverage_support attribute RELNOTES:none PiperOrigin-RevId: 199352111
* Allow rules and targets to specify extra execution platform constraints.Gravatar John Cater2018-06-05
| | | | | | | | | | | | | | | | | | | | | | RuleClass.Builder now allows authors to specify whether a rule's targets can add additional constraints on the execution platform, and to declare additional constraints for all targets of that rule. Targets which support this now have an attribute, "exec_compatible_with", which supports specifying additional constraints that the execution platform used must match. This attribute is non-configurable. It will only affect execution platforms used during toolchain resolution. Part of #5217. Change-Id: Id2400dbf869a00aa2be3e3d2f085c2850cd6dc00 Closes #5227. Change-Id: If7d55f08f7f44bc7d7f6dfec86a3e6bcd68574b9 PiperOrigin-RevId: 199326255
* Add functionality to SerializationContext and @AutoCodec to check that a ↵Gravatar janakr2018-06-05
| | | | | | | | class is allowed to be serialized in the current context. A codec can now add an explicitly allowed class that can be serialized underneath it (via SerializationContext#addExplicitlyAllowedClass), and that class's codec can check that it is explicitly allowed (via SerializationContext#checkClassExplicitlyAllowed). It is a runtime crash if a codec checks that it was explicitly allowed and finds that it wasn't. Thus, if PackageCodec is invoked without it having been explicitly allowed, we will crash, preventing Package from sneaking into a value it shouldn't be in. This is only enabled if the codec is memoizing. PiperOrigin-RevId: 199317936
* Automated rollback of commit 52c4d05d1bfd54ea901e9926be7b262dd45e34de.Gravatar dbabkin2018-06-05
| | | | | | | | | | | | | *** Reason for rollback *** http://b/109733929 *** Original change description *** Add LabelLateBoundDefault to :coverage_report_generator attribute RELNOTES:none PiperOrigin-RevId: 199308190
* 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