aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Added named=true to output_group.group_nameGravatar cparsons2018-03-07
| | | | | | | This was migrated incorrectly, as there's a semantic difference between @Param for @SkylarkSignature and for @SkylarkCallable, it would appear. RELNOTES: None. PiperOrigin-RevId: 188190409
* 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
* Make the builtins registry thread-safeGravatar brandjon2018-03-06
| | | | | | | | | | | | | | It was previously assumed that safety wasn't needed because 1) all builtins should be registered in static initializer blocks, and 2) all retrievals should occur during Skylark evaluation, after static initialization completes. It turns out these assumptions aren't actually true (Who would've thunk it!). SkylarkActionFactory has been observed to be initialized as late as analysis time, and retrievals occur as early as constructing a PackageFactory (when scanning the native module). The failure mode is particularly ugly: Random Skylark method lookups will fail non-deterministically. This change guards against this by making the builtins registry implement a form of freezing. Before freezing, reads and writes are allowed and are synchronized. After freezing, only reads are allowed and they are unsynchronized for performance. BlazeRuntime is responsible for flipping the bit, and for ensuring classes like SkylarkActionFactory run their initialization by that point. Unit tests don't need to worry, since they just stay unfrozen and synchronized throughout. RELNOTES: None PiperOrigin-RevId: 188080136
* Add proper serialization constructor and equals/hashCode for EnvironmentLabels.Gravatar janakr2018-03-06
| | | | PiperOrigin-RevId: 188078054
* Do not expose platform-related providers to Skylark.Gravatar John Cater2018-03-06
| | | | | | | | | | | | This prevents both creation and access to platform providers from Skylark. This is needed so we can load platforms directly from platform-rule targets without needing a full configured target, and to effiently distinguish platform providers from non-platform providers. Change-Id: I6b61f9ee7518d5e9311232908a922596e18fe32f PiperOrigin-RevId: 188070457
* Convert a bunch of non-AutoCodec classes to use @AutoCodec: ↵Gravatar janakr2018-03-06
| | | | | | BuildConfiguration, BuildOptions, CollectTargetsUnderDirectoryValue. PiperOrigin-RevId: 188059815
* Fix incomplete documentation changeGravatar brandjon2018-03-06
| | | | | | | | | This finishes a partial change erroneously submitted as part of https://github.com/bazelbuild/bazel/commit/864ac520951821bd197a02490d2b04f6246be7fa. The full outputs map behavior is still not fully described because its implementation is too complex. That requires a separate discussion. RELNOTES: None PiperOrigin-RevId: 188049028
* 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 for ConfigurationTransition subclasses.Gravatar shahan2018-03-02
| | | | | | Needed for Attribute serialization. PiperOrigin-RevId: 187676061
* Revamp docs for ctx.outputsGravatar brandjon2018-03-02
| | | | | | | Explain the deprecation of ctx.outputs.executable. RELNOTES: None PiperOrigin-RevId: 187640408
* Revamp discussion of executable/test rulesGravatar brandjon2018-03-02
| | | | | | | Rewrite that part of rules.md and update rule() docs. Also clarify the Action object's docs to put it in context. RELNOTES: None PiperOrigin-RevId: 187636896
* @AutoCodec ConfiguredTargetValue.Gravatar cpeyser2018-03-02
| | | | PiperOrigin-RevId: 187635570
* Add execution platform information to the action key.Gravatar John Cater2018-03-02
| | | | | | | | | | Needed so that actions are properly invalidated and re-run when the platform's remote execution properties change. Fixes #4756. Closes #4728. Change-Id: Ia227d110c10c9aad2164cefa8a90361cc4359332 PiperOrigin-RevId: 187621349
* 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
* Migrate a few trivial uses of @SkylarkSignature to use @SkylarkCallable insteadGravatar cparsons2018-03-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 187531006
* Make the distinction between "global frame" and "lexical frame" explicit. As ↵Gravatar nharmata2018-03-01
| | | | | | | a nice consequence, this lets us reduce GC churn since we no longer need to create a frame instance for the lexical frame at a callsite of either a function when the environment is frozen or a builtin function (since builtins cannot modify bindings in their lexical frame). RELNOTES: None PiperOrigin-RevId: 187495787
* Remove --incompatible_load_argument_is_label flagGravatar laurentlb2018-03-01
| | | | | | RELNOTES: Removed flag `--incompatible_load_argument_is_label`. PiperOrigin-RevId: 187479614
* Remove a misleading comment.Gravatar carmi2018-02-28
| | | | | | | installBase is also used to access the embedded binaries. RELNOTES: None PiperOrigin-RevId: 187422136
* Deletes CODEC fields now that they are no longer needed.Gravatar shahan2018-02-28
| | | | PiperOrigin-RevId: 187397314
* Add @AutoCodec to FileType and FileTypeSet.Gravatar mjhalupka2018-02-28
| | | | | | More strictly type the arguments for creating FileTypes. PiperOrigin-RevId: 187391336
* Refactor the AbstractAction computeKey method to be easier to add invariantsGravatar jcater2018-02-28
| | | | | | for every type of action. PiperOrigin-RevId: 187368369
* Deprecate and remove several uses of the 'values' map in NativeInfo subclasses.Gravatar cparsons2018-02-28
| | | | | | | | | | These subclasses should be using @SkylarkCallable(structField = true) instead This is a bit of a memory win, as there is now no need to store field information twice. There are still a couple of stragglers that are more difficult, namely ToolchainInfo and DefaultInfo. Their APIs will likely need some more extensive revamping before proceeding. RELNOTES: None. PiperOrigin-RevId: 187364392
* Deletes AutoCodec.Strategy.SINGLETON now that we have @AutoCodec field tags.Gravatar shahan2018-02-28
| | | | | | This also gets rid of some static initialization cycles which we should try very hard to avoid in the future. PiperOrigin-RevId: 187334087
* Add @AutoCodec to some PatchTransitions.Gravatar mjhalupka2018-02-27
| | | | PiperOrigin-RevId: 187230702
* 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
* Expose --output_user_base to the Bazel server processGravatar Klaus Aehlig2018-02-27
| | | | | | | | | | | ...so that it can use that path to compute other directories in the output user base, in particular the default location for caches. The first cache we will add is the hash-index cache for downloads of external archives, but a spawn cache might be added later in the output user base as well. Change-Id: I24b1c33235c8f76ec008ecb1789163de2b2a45be PiperOrigin-RevId: 187164275
* @AutoCodec FileWriteAction.Gravatar janakr2018-02-26
| | | | PiperOrigin-RevId: 187048921
* @AutoCodec PackageGroupConfiguredTarget (forgot to actually annotate the ↵Gravatar janakr2018-02-26
| | | | | | class in https://github.com/bazelbuild/bazel/commit/14e549cc6596f67ed22c1bac0819f0775e4fb806). PiperOrigin-RevId: 187042482
* Revamp docs for default outputs / output groupsGravatar brandjon2018-02-26
| | | | | | | | | | | - collapsed these into one section - removed the term "implicit outputs" - add explanation for what these are first, then how to control them - update docs for DefaultInfo - also update docs for test/executable args of rule() RELNOTES: None PiperOrigin-RevId: 187026641
* Revamp rules.md documentation for filesGravatar brandjon2018-02-26
| | | | | | | Unified "Files" and "Output files" sections. Renamed "declared files" to "predeclared files" to avoid confusion with "declare_file()"/"declare_directory()". RELNOTES: None PiperOrigin-RevId: 187017607
* @AutoCodec RuleConfiguredTarget.Gravatar janakr2018-02-23
| | | | PiperOrigin-RevId: 186849562
* @AutoCodec FilesetOutputConfiguredTarget.Gravatar janakr2018-02-23
| | | | PiperOrigin-RevId: 186837642
* @AutoCodec all the *ConfiguredTarget classes except for ↵Gravatar janakr2018-02-23
| | | | | | | | | | RuleConfiguredTarget. RuleConfiguredTarget is harder, and will be handled in a follow-up. Also remove duplicate field from InputFileConfiguredTarget and unused parameter in EnvironmentGroupConfiguredTarget constructor. Largely punt on FilesetOutputConfiguredTarget for now, but will handle soon. PiperOrigin-RevId: 186829768
* Better @AutoCodec for TransitiveInfoProviderMapImpl: avoid having to ↵Gravatar janakr2018-02-23
| | | | | | serialize offset table at the cost of some overhead reconstructing the table. Also fewer code changes, although there is a serialization-only method added as a hack. PiperOrigin-RevId: 186808832
* 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 TransitiveInfoProviderMapImpl and JavaInfo.Gravatar janakr2018-02-23
| | | | PiperOrigin-RevId: 186789569
* Add a new BuildOptions diff method that holds and pretty prints the ↵Gravatar juliexxia2018-02-23
| | | | | | different option values between two BuildOptions PiperOrigin-RevId: 186769975
* @AutoCodec for GenRuleAction.Gravatar cpeyser2018-02-23
| | | | PiperOrigin-RevId: 186765754
* Move enabling of coverage related features to CcCommonGravatar Googler2018-02-23
| | | | | | | | Move dealing with coverage related features from CppConfiguration.configurationEnabledFeatures to CcCommon.configureFeatures. Remove configurationEnabledFeatures. RELNOTES: None. PiperOrigin-RevId: 186744803
* Fix baseline.lcov name in important_outputGravatar Googler2018-02-22
| | | | | | This was already fixed in the file set, but was missed in important_output field. PiperOrigin-RevId: 186711917
* 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
* Add option to dump the action graph.Gravatar twerth2018-02-22
| | | | | | | | | | | | | Note that this dumps the current state in skyframe (which may contain more nodes than you're interested in): - bazel build --nobuild //interesting:targets - bazel dump --action_graph=/path/to/file - printproto --proto2 --raw_protocol_buffer --message=action_graph.ActionGraphContainer --multiline --proto=third_party/bazel/src/main/protobuf/action_graph.proto /path/to/file We'll add filtering options in a later CL. RELNOTES[NEW]: Add option to dump the action graph to a file: 'bazel dump --action_graph=/path/to/file'. PiperOrigin-RevId: 186597930
* Do not expand depset twice and store expanded in ctx.actions.run inputs.Gravatar tomlu2018-02-21
| | | | | | | | | | | | | | Previously, when inputs is a depset, we'd: * Expand it to a collection, then * Expand it again and add it as a flat list to the input builder This would be square on both performance and analysis time memory. Note that we _still_ expand the depset once to try to see if any input is a tool. This will have to be fixed in a future CL. RELNOTES: None PiperOrigin-RevId: 186566243
* Clean up test tag handlingGravatar ulfjack2018-02-21
| | | | PiperOrigin-RevId: 186427907
* Deletes POLYMORPHIC strategy. ObjectCodec now uses runtime type information ↵Gravatar shahan2018-02-20
| | | | | | to select a codec. PiperOrigin-RevId: 186378153
* Update --flaky_test_attempts to also take a repeatable argument of the formGravatar jcater2018-02-20
| | | | | | | | | regex@attempts, similarly to --runs_per_test. Also re-arrange some option converters to be closer to their options. RELNOTES: flaky_test_attempts supports the regex@attempts syntax, like runs_per_test. PiperOrigin-RevId: 186358437
* Route fdo logic that deals with the path to the fdo profile through ↵Gravatar Googler2018-02-20
| | | | | | | | | | CcToolchainProvider As --fdo_optimize can point to a label, the path to the fdo profile can not be reliably determined in CppConfiguration. In order to enable the fdo features (which depend on the path to the fdo profile), the logic from CppConfiguration.configurationEnabledFeatures() has been moved to CcCommon.configureFeatures(). The latter method has access to the fdo profile path through CcToolchainProvider. RELNOTES: None. PiperOrigin-RevId: 186278311
* Change Skylark's print() on a rule target to print the Skylark-exposed ↵Gravatar cparsons2018-02-16
| | | | | | | | | provider keys. This change only affects printing a rule target directly -- it intentionally does not affect the behavior of str(target), as we want to avoid skylark code being able to parse potentially-private provider keys. RELNOTES: In skylark, print(target) now shows the provider keys of a target, as debug information. PiperOrigin-RevId: 186046226
* Add @AutoCodec for FdoSupport(Provider) and TemplateVariableInfo.Gravatar mjhalupka2018-02-16
| | | | PiperOrigin-RevId: 186007056