aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Adds support for multiple top-level dynamic configurationsGravatar Greg Estren2016-11-21
| | | | | | | (e.g. --experimental_multi_cpu). -- MOS_MIGRATED_REVID=139607063
* Extra-actions originating in Aspects are reported even if the rule we attach ↵Gravatar Carmi Grushko2016-11-21
| | | | | | | | | | | | | | | | | to also registers extra-actions. ExtraActionArtifactsProvider was using a set of ExtraArtifactSet, whose key was derived from the label of the owner of the extra-action. Since actions registered by Aspects have the same label as those registered by the base rule, the former ones would disappear from the set. An alternative to this CL would be to use an ArtifactOwner instead of a label as the key of the ExtraArtifactSet, but 1. BuildView only has access to ConfiguredTarget's, which lack the information to manipulate ArtifactOwner's; and 2. I don't see what ExtraArtifactSet gains us. In particular, ExtraArtifactSet.getLabel() is not used by anything outside of ExtraArtifactSet. The only disadvantage of this CL is that filtering (--experimental_extra_action_filter) can be slower if targets register a massive number of actions. Before this CL, we would match a single label per rule, while after this CL we match a single label per action. -- MOS_MIGRATED_REVID=139591862
* Implement 'output_groups' provider.Gravatar Dmitry Lomov2016-11-21
| | | | | | | | | | This behavior - that 'output_groups' is a provider available on targets and aspects - has been accidental, but people already depend on it. This CL keeps that behavior, while fixing the bug that two aspects could not both provide output groups. -- MOS_MIGRATED_REVID=139578378
* Allow labels in the '--aspects' parameter.Gravatar Dmitry Lomov2016-11-21
| | | | | -- MOS_MIGRATED_REVID=139573590
* Fix up documentation for Actions APIGravatar Jon Brandvein2016-11-18
| | | | | -- MOS_MIGRATED_REVID=139569372
* Run the analysis phase with as many threads as the user wants. In order to ↵Gravatar Janak Ramakrishnan2016-11-18
| | | | | | | | | avoid memory blow-up intra-configured-target analysis, use a semaphore to ensure that CPU-bound work only occurs on #CPU-many threads. RELNOTES: Use --loading_phase_threads to control the number of threads used during the loading/analysis phase. -- MOS_MIGRATED_REVID=139477645
* Add ctx.coverage_instrumented function to SkylarkGravatar Googler2016-11-17
| | | | | | | | | | | | | | | Skylark already has ctx.configuration.coverage_enabled to determine if coverage data collection is on for an entire run. But that does not reveal which targets specifically are supposed to be instrumented (based on the values of --instrumentation_filer and --instrument_test_targets). This is inefficient for languages which add coverage instrumentation at compile-time, though correct coverage output can still be produced by instrumenting everything and filtering later. By default, this function returns whether the rule represented by ctx should be instrumented. If a Skylark Target (e.g. from a label or label_list attribute in ctx.attr) is passed to the function, it instead returns whether that Target is a rule whose sources should be instrumented. Rules that directly incorporate source-files from their dependencies before compilation (e.g. header files) may need to know if those source files need to be instrumented when compiled. Expanded the documentation of instrumented_files to be a more general section on implementing code coverage instrumentation in Skylark. Also tweaked the code comment and variable names for the version of shouldIncludeLocalSources that takes a TransitiveInfoCollection. RELNOTES: Add ctx.coverage_instrumented function to Skylark, to indicate whether a specific targets should be instrumented for code coverage data collection. -- MOS_MIGRATED_REVID=139460989
* ObjcCompileAction does not signal to skyframe that it discovers inputs.Gravatar Cal Peyser2016-11-17
| | | | | | | | | | | Instead, it skips discovery (include scanning), but provides all headers to action execution to allow for re-adding pruned sources in a sandbox. This means that mis-capitalization errors will only break a build if --objc_use_dotd_pruning is one. -- MOS_MIGRATED_REVID=139456194
* Supports --nodistinct_host_configuration withGravatar Greg Estren2016-11-16
| | | | | | | | | | | --experimental_dynamic_configs=notrim. This is simply a matter of populating the "global" host config from the target config instead of applying the HostTransition patch. -- MOS_MIGRATED_REVID=139222963
* Description redacted.Gravatar Cal Peyser2016-11-16
| | | | | -- MOS_MIGRATED_REVID=139219934
* Updates outdated options documentation forGravatar Greg Estren2016-11-16
| | | | | | | --distinct_host_configuration. -- MOS_MIGRATED_REVID=139205874
* Aspects-on-aspects implementation.Gravatar Dmitry Lomov2016-11-15
| | | | | -- MOS_MIGRATED_REVID=139189444
* Add an escape hatch to quickly disable ↵Gravatar Carmi Grushko2016-11-14
| | | | | | | --experimental_extra_action_top_level_only for Aspects. -- MOS_MIGRATED_REVID=139003012
* Fix doc bug: Target.files is the immediate files-to-build, not transitiveGravatar Jon Brandvein2016-11-14
| | | | | -- MOS_MIGRATED_REVID=138926471
* ObjcCompileAction provides all headers to sandboxed execution. This allowsGravatar Cal Peyser2016-11-11
| | | | | | | headers pruned by .d pruning to be re-added if they are changed. -- MOS_MIGRATED_REVID=138866385
* Do not crash when aspects provide duplicate things.Gravatar Dmitry Lomov2016-11-11
| | | | | -- MOS_MIGRATED_REVID=138860974
* Expose aspect-related information in the extra-action proto that Bazel hands ↵Gravatar Carmi Grushko2016-11-11
| | | | | | | | | to action_listener() rules. RELNOTES: Extra actions now contain aspect-related information. -- MOS_MIGRATED_REVID=138832922
* Fix a bunch of typosGravatar Jon Brandvein2016-11-10
| | | | | -- MOS_MIGRATED_REVID=138757881
* Migrate ActionOwner to @AutoValue.Gravatar Carmi Grushko2016-11-10
| | | | | -- MOS_MIGRATED_REVID=138680612
* When --experimental_extra_action_top_level_only, Bazel to report ↵Gravatar Carmi Grushko2016-11-09
| | | | | | | | | | | extra-actions for actions registered by Aspects injected by a top-level rule. Because we can't know whether an aspect was injected by a top-level target or one of its children, we approximate it by only reporting extra-actions from Aspects that the top-level target could have injected. RELNOTES: When --experimental_extra_action_top_level_only, Bazel reports extra-actions for actions registered by Aspects injected by a top-level rule (approximately). -- MOS_MIGRATED_REVID=138570606
* For SpawnActions, also honor the dynamic environmentGravatar Klaus Aehlig2016-11-07
| | | | | | | | | | | | | For SpawnActions, depending on the value of use_default_shell_env, the specified environment is taken. The shell environment, however, consists of two parts: a static mapping of variables to values, and a set of variables where the value is to be taken from the client environment. Make sure, both parts are set correctly. Fixes #2035. -- Change-Id: I32253e9bf651b18ca25107edc5fc839813905726 Reviewed-on: https://bazel-review.googlesource.com/#/c/7211 MOS_MIGRATED_REVID=138376914
* Do not propagate aspect to own attributes when using '*'.Gravatar Googler2016-11-04
| | | | | | | RELNOTES: Do not propagate aspect to its own attributes when using '*'. -- MOS_MIGRATED_REVID=138194456
* Also provide test summaries in the build-event streamGravatar Klaus Aehlig2016-11-02
| | | | | | | | | | | For each test target, also have a test summary as children to this event. As test summaries are posted on the event bus anyway, it is enough to make then an instance of BuildEvent. -- Change-Id: Id53e5f1760548a1fa621b1667fdb4470f51a52e8 Reviewed-on: https://bazel-review.googlesource.com/#/c/6931 MOS_MIGRATED_REVID=137961100
* Rollback, breaks dependent code.Gravatar Jon Brandvein2016-11-02
| | | | | -- MOS_MIGRATED_REVID=137864618
* ObjcCompileAction provides all headers to sandboxed execution. This allowsGravatar Cal Peyser2016-10-31
| | | | | | | headers pruned by .d pruning to be re-added if they are changed. -- MOS_MIGRATED_REVID=137697323
* Small docs updates for the extra action rule.Gravatar Ulf Adams2016-10-28
| | | | | | | | Add the product name to the ConfiguredRuleClassProvider so that the doc generator can generate the proper links to the user manual. -- MOS_MIGRATED_REVID=137505460
* Move ToolsRepository out of EnvironmentGravatar Laurent Le Brun2016-10-27
| | | | | | | | | Other fields will follow (is_skylark, phase, callerLabel). The goal is to make Environment (and more generally Skylark) less dependent on Bazel. -- MOS_MIGRATED_REVID=137386248
* Report completion of a target together with failed actionsGravatar Klaus Aehlig2016-10-27
| | | | | | | | | | | | | | | | Report the completion of all targets together with the root causes on the build event stream. To do so, have TargetCompleteEvent and ActionExecutedEvent be instances of BuildEvent; however, ignore an ActionExecutedEvent in the BuildEventStreamer if the execution was successful. By this change we get, for the first time, a build event stream that is naturally closed, i.e., without Aborted events closing up lose ends. Add a test asserting this property. -- Change-Id: Ie90dd52ee80deb0fdabdce1da551935522880a1a Reviewed-on: https://bazel-review.googlesource.com/#/c/6279 MOS_MIGRATED_REVID=137273002
* Add a new concept of failure causesGravatar Klaus Aehlig2016-10-25
| | | | | | | | | | | | | | | | | | | | Not all possible reasons for failure are uniquely identified by a label. Therefore, add a new data type describing possible root causes of failures and use it. The new type is added in causes/*.java and coresponds to Haskell's one-line definition data Cause = LabelCause Label | ActionCause Path Label deriving Show With future clean up of other failure causes inadequately described by a label, we expect that type to be extended by new constructors (i.e., new classes implementing Cause). -- Change-Id: I6fec74c78cec6abb9c10e32743b05a792888fead Reviewed-on: https://bazel-review.googlesource.com/#/c/6617 MOS_MIGRATED_REVID=137156390
* Trim labels in location expressions before expansion.Gravatar Tobias Werth2016-10-25
| | | | | | | -- Change-Id: If626fd448ddbfbdf65b71569fda7a9b206e5f8b2 Reviewed-on: https://bazel-review.googlesource.com/c/6890/ MOS_MIGRATED_REVID=137155361
* Move the RuleModule interface to ConfiguredRCP and rename it to RuleSet.Gravatar Ulf Adams2016-10-19
| | | | | -- MOS_MIGRATED_REVID=136463385
* Refactor the rule class provider.Gravatar Ulf Adams2016-10-18
| | | | | | | | | | | | - add a convenience method to make adding options + fragment factories a bit simpler - sort the objc rules alphabetically - split the j2objc rules from the objc rules - unfortunately, the objc rules depend on the j2objc configuration, so that has to stay -- MOS_MIGRATED_REVID=136442577
* Rename field to clarify function.Gravatar Ulf Adams2016-10-14
| | | | | -- MOS_MIGRATED_REVID=136152771
* Expand $(location :label) to string unambiguously a pathGravatar Klaus Aehlig2016-10-14
| | | | | | | | | | | | | | | | | | | In genrules, cmd strings of the form "$(location :label) ..." are used with the assumption that the executable named by the label will be called. This holds true as long as $(location :label) expands to a string that is recognizable as a path, i.e., as long as :label does not refer to a file in the top-level directory. In the latter case, however, that string will be the plain file name and the shell will search for that name in the search path. This will fail, if '.' is not in the search path; even worse, if a file with that name is in the search path before '.', then that one will be called which is not what the user intended to do. Fix this unintended behavior by expanding $(location :label) to a string that unambiguously is a path. -- Change-Id: If8681039a8befae6234fbe0cbe3a0f75eedba7aa Reviewed-on: https://bazel-review.googlesource.com/#/c/6691 MOS_MIGRATED_REVID=136151500
* Merge BazelBaseRuleClasses into BaseRuleClasses.Gravatar Ulf Adams2016-10-14
| | | | | | | There doesn't seem to be any reason to keep them separate. -- MOS_MIGRATED_REVID=136145734
* Remove unneeded annotationGravatar Jon Brandvein2016-10-12
| | | | | | | | It was a temporary workaround due to client Skylark code that was sensitive to type(). That code has been fixed. -- MOS_MIGRATED_REVID=135920620
* [Roll-forward] Rollback of commit dd299dbc61be51112534a4698f7cf2deee43053b.Gravatar Jon Brandvein2016-10-12
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed underlying broken CL that was depended on *** Original change description *** Automated [] rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2. *** Reason for rollback *** Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add API for individual actions This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135821603
* Make EvalUtils.getDataTypeNameFromClass() look for @SkylarkModules in parent ↵Gravatar Jon Brandvein2016-10-12
| | | | | | | | | classes This is needed to let subclasses of @SkylarkModules have the same type() string as their superclass, without requiring a second annotation for the subclass. -- MOS_MIGRATED_REVID=135814343
* Rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2.Gravatar Ulf Adams2016-10-11
| | | | | | | | | | | | | | | *** Reason for rollback *** Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add API for individual actions This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135783964
* Adding support for Linux s390xGravatar namrata-ibm2016-10-11
| | | | | | | | | | | We have added support for Linux s390x platform in Bazel. Closes #1891. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1891 MOS_MIGRATED_REVID=135777047
* Add bin_dir and genfiles_dir to ctxGravatar Kristina Chodorow2016-10-11
| | | | | -- MOS_MIGRATED_REVID=135689610
* Supported "in" operator for all SkylarkIndexable objects.Gravatar Vladimir Moskva2016-10-07
| | | | | -- MOS_MIGRATED_REVID=135483694
* Implement cc_common.link_params_merge function.Gravatar Dmitry Lomov2016-10-07
| | | | | -- MOS_MIGRATED_REVID=135458547
* Change allowedRuleClasses/mandatoryProviders semantics to "either-or" ↵Gravatar Dmitry Lomov2016-10-07
| | | | | | | | | | instead of "and". Also allow native rules to require declared providers on their dependencies. -- MOS_MIGRATED_REVID=135454750
* remove inaccurate sentence from DependencyResolver commentsGravatar Benjamin Peterson2016-10-07
| | | | | | | | | | | | The comments for DependencyResolver.dependentNodeMap implied that visiting of visibility attributes could be controlled with a visitVisibility parameter. However, no such parameter exists, and the code unconditionally visits visibility attributes. -- Change-Id: Iecf803aed771423b2f25e911c041e0017b77d29d Reviewed-on: https://bazel-review.googlesource.com/#/c/6211/ MOS_MIGRATED_REVID=135454173
* Add cc_common.link_params declared provider.Gravatar Dmitry Lomov2016-10-07
| | | | | -- MOS_MIGRATED_REVID=135346927
* Extract java/javalite proto compilation args to command-line flags.Gravatar Carmi Grushko2016-10-06
| | | | | | | Addresses https://github.com/bazelbuild/bazel/issues/1718 -- MOS_MIGRATED_REVID=135274306
* Proper error messages when built-in rule attributes are overridden #1811Gravatar Vladimir Moskva2016-10-05
| | | | | -- MOS_MIGRATED_REVID=135241715
* Add API for individual actionsGravatar Jon Brandvein2016-10-05
| | | | | | | This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135226123
* Don't inherit the host configuration's fragments from the target config in ↵Gravatar Greg Estren2016-10-05
| | | | | | | --experimental_dynamic_configs=notrim mode. -- MOS_MIGRATED_REVID=135126724