aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/skylark
Commit message (Collapse)AuthorAge
...
* Add AutoCodec for a bunch of cc library providers.Gravatar mjhalupka2018-02-15
| | | | PiperOrigin-RevId: 185850685
* Remove hard-wired basenames for the test setup and the coverage collection ↵Gravatar lberki2018-02-09
| | | | | | | | | script. Accomplished by creating an explicit attribute for both of them on test actions. RELNOTES: None. PiperOrigin-RevId: 185132460
* Stop allowing generic LateBoundDefault value types. Such types are always ↵Gravatar janakr2018-02-02
| | | | | | | | either a Label or a List<Label>. We can easily enforce this through static type checking, so do it. This will help with LateBoundDefault serialization, since we don't have to serialize an arbitrary object. PiperOrigin-RevId: 184347100
* Fix string_list_dict values to be skylark lists in all casesGravatar cparsons2018-01-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 184016150
* Remove Skylark ConfigurationTransition.DATA references.Gravatar gregce2018-01-29
| | | | PiperOrigin-RevId: 183733621
* Do not crash when ctx.action.args.add map_fn returns a list of the wrong length.Gravatar tomlu2018-01-29
| | | | PiperOrigin-RevId: 183668291
* Add CommandLineItem interface.Gravatar tomlu2018-01-25
| | | | | | | | This interface makes it clearer in the type system exactly how items that go into a CustomCommandLine are turned into strings. It is a preparatory change to allow command line fingerprints to be more cheaply calculated, but it is valuable in itself from a code quality standpoint. PiperOrigin-RevId: 183274022
* Only allow files created by the same rule as executable outputs of a rule.Gravatar Dmitry Lomov2018-01-22
| | | | | | | Fixes #4170. Change-Id: I308ee17eb769dcc6a94b90b1dd6cc2ccbe14e968 PiperOrigin-RevId: 182807196
* Remove ConfigurationTransitionProxy.NONE and ↵Gravatar gregce2018-01-18
| | | | | | | | BaseRuleClasses.DYNAMIC_TRANSITION_MAP. This leaves DATA as the last remaining legacy transition. PiperOrigin-RevId: 182422552
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Rename Root to ArtifactRoot.Gravatar tomlu2018-01-16
| | | | | | This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath. PiperOrigin-RevId: 182082367
* Simplify SkylarkRuleContext#getBuildFileRelativePath.Gravatar tomlu2018-01-11
| | | | | | We don't need to construct roots to relativize a path. PiperOrigin-RevId: 181661592
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2018-01-10
| | | | | | | | This is a rollforward -- the previous attempt was rolled back due to incorrectly adding test sources. In addition, the newly checked in tests do not work on Windows, and are thus disabled on the Windows platform. I suspect this is due to a bug in the compile-testing library. RELNOTES: None. PiperOrigin-RevId: 181482589
* Info-related cleanupsGravatar brandjon2018-01-10
| | | | | | | | | - Reorder Info methods for consistency with ClassObject - "StructConstructor" -> "StructProvider" - Added javadoc RELNOTES: None PiperOrigin-RevId: 181469643
* Fix the attr documentationGravatar vladmos2018-01-05
| | | | | | Fixed a broken link, also applied a couple of minor changes. PiperOrigin-RevId: 180913699
* Allow late bound defaults in skylark aspectsGravatar cparsons2018-01-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 180849649
* Automated rollback of commit 46356dfa59428b665aa280ba4cbca6e449f73c5b.Gravatar laszlocsomor2018-01-02
| | | | | | | | | | | | | *** Reason for rollback *** causes github #4375 and #4373 *** Original change description *** Use an annotation preprocessor to validate SkylarkConfigurationField. RELNOTES: None. PiperOrigin-RevId: 180535458
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374
* Refactor Info classGravatar brandjon2017-12-27
| | | | | | | This simplifies the location field (now non-nullable), removes a couple redundant loc args, and clarifies the type's description and some javadoc. RELNOTES: None PiperOrigin-RevId: 180210943
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Remove final accessors of ConfigurationTransition.HOST.Gravatar gregce2017-12-21
| | | | | | | Also lean interfaces from Attribute.ConfigurationTransition to Attribute.Transition. PiperOrigin-RevId: 179846158
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Change cfg(HOST) to cfg(HostTransition.INSTANCE).Gravatar gregce2017-12-21
| | | | | | Preparatory step for removing ConfigurationTransition.HOST. PiperOrigin-RevId: 179838374
* Fix the attr documentationGravatar vladmos2017-12-21
| | | | | | | | The documentation refers the `executable` attribute that doesn't exist for `attr.label_list` or `attr.label_keyed_string_dict`. Also it doesn't explain what the available options for `cfg` mean. PiperOrigin-RevId: 179807288
* Refactor SkylarkProvider constructors and add testsGravatar brandjon2017-12-21
| | | | | | | A new constructor is exposed for building an already-exported SkylarkProvider. The existing constructor no longer takes a name argument (since it was almost entirely ignored). The contract around the name arg for BaseFunction has been refined: it is null if the subclass provides its own naming mechanism. RELNOTES: None PiperOrigin-RevId: 179804491
* Remove ConfigurationTransition.HOST references from lib.packages.Gravatar gregce2017-12-20
| | | | | | | | | | | | | | | | | | | | This removes the main barrier to making host transitions routine patch transitions. Today you signify a host transition by calling Attribute.Builder.cfg(ConfigurationTransition.HOST). Blaze's configuration machinery auto-converts this to HostTransition.INSTANCE, which is a patch transition. This change provides the groundwork for removing ConfigurationTransition.HOST and removing the special conversion logic. This also paves the way for better API support for multiple host configurations. Also change some cfg(HOST) rule references to cfg(HostTransition.INSTANCE). PiperOrigin-RevId: 179754619
* Expose ObjcProtoAspect to Skylark.Gravatar cparsons2017-12-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 179737025
* Doccomment missing space.Gravatar Nathan Herring2017-12-20
| | | | | | Closes #4326. PiperOrigin-RevId: 179734266
* Aspects-on-aspect see and propagate over aspect attributes.Gravatar dslomov2017-12-20
| | | | | | | | | | | If an aspect is applied to a rule+aspect node, all attributes are merged into ctx.rule.attr collection, and the first one with the same name wins (in particular, rule attribute will always win over aspect attribute). This is backwards-compatible, and unlikely to cause problems in practice. RELNOTES: Aspects-on-aspect see and propagate over aspect attributes. PiperOrigin-RevId: 179675660
* Automated rollback of commit 2f10da0db062e023b1f0f8222f8545467b29ae4e.Gravatar schmitt2017-12-19
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks skylark rules using $ in action cmd line. *** Original change description *** Change CommandHelper to use TemplateExpander directly This is a partial rollback of https://github.com/bazelbuild/bazel/commit/e8d32b7c922f65539b74357711d5ad6b70934115, only the CommandHelper change. Progress on #2475. PiperOrigin-RevId: 179607027
* Fix links to Build EncyclopediaGravatar vladmos2017-12-19
| | | | PiperOrigin-RevId: 179556225
* Improve doc for .files and add more links/examples.Gravatar laurentlb2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179448100
* Fix a documentation linkGravatar vladmos2017-12-18
| | | | PiperOrigin-RevId: 179416493
* Change CommandHelper to use TemplateExpander directlyGravatar ulfjack2017-12-18
| | | | | | | | This is a partial rollback of https://github.com/bazelbuild/bazel/commit/e8d32b7c922f65539b74357711d5ad6b70934115, only the CommandHelper change. Progress on #2475. PiperOrigin-RevId: 179413908
* Fix the documentation formatting for SkylarkAttrGravatar vladmos2017-12-15
| | | | | | Make sure all sentences are capitalised and end with a point PiperOrigin-RevId: 179214070
* Clarify types of `ctx.attr.<attr_name>` objects.Gravatar vladmos2017-12-14
| | | | PiperOrigin-RevId: 179053724
* Rename OutputGroupProvider -> OutputGroupInfo.Gravatar dslomov2017-12-14
| | | | | RELNOTES: None PiperOrigin-RevId: 179046403
* Add more links to examples in the documentation.Gravatar laurentlb2017-12-13
| | | | | RELNOTES: None. PiperOrigin-RevId: 178946746
* Fix the documentation to allow making links to BE documetation articlesGravatar vladmos2017-12-13
| | | | PiperOrigin-RevId: 178910168
* Doc: mention that sibling must be in the same package.Gravatar laurentlb2017-12-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 178609245
* Register builtins with RuntimeGravatar brandjon2017-12-07
| | | | | | | | | | | This covers all builtins in classes that use SkylarkSignatureProcessor#configureSkylarkFunctions. Generally this means things you define with @SkylarkSignature. It is now an error to call configureSkylarkFunctions multiple times for the same class. It should only be called in static initializers. Runtime's static knowledge of builtins has been factored into Runtime.BuiltinRegistry. RELNOTES: None PiperOrigin-RevId: 178295926
* Remove the ctx.middle_man function from Skylark.Gravatar lberki2017-12-07
| | | | | | | | Let's not expose middlemen to Skylark if we can help. RELNOTES[INC]: The ctx.middle_man function is not supported anymore. PiperOrigin-RevId: 178226393
* Fix missing print statements in output functionsGravatar vladmos2017-12-02
| | | | PiperOrigin-RevId: 177708823
* Mark relative_to_caller_repository as deprecated in Label constructor.Gravatar laurentlb2017-11-30
| | | | | RELNOTES: in the Label() function, relative_to_caller_repository is now deprecated. PiperOrigin-RevId: 177443907
* refactor: add LocationExpander factoriesGravatar L?szl? Csomor2017-11-28
| | | | | | | | | | | | | | | | | | Stop using LocationExpander.Options in LocationExpander constructors, because the Options semantics are confusing. I also need the refactoring in order to extend the expansion semantics: to support expanding to absolute paths on Windows, where $(location) should not expand to the (non-existent) runfiles path, but to the absolute path the runfiles symlink would point to. See https://github.com/bazelbuild/bazel/issues/4171 Change-Id: Ie4d47ec3807bc3c6e39156efa1746b666f69f99c PiperOrigin-RevId: 177147372
* bazel: s/ctx.run()/ctx.actions.run()/Gravatar Googler2017-11-27
| | | | | | | I can't find whether ctx.run() actually exists. https://docs.bazel.build/versions/master/skylark/lib/ctx.html implies it doesn't. RELNOTES: None. PiperOrigin-RevId: 177005229
* Documentation for aspects-on-aspects.Gravatar Dmitry Lomov2017-11-14
| | | | | Change-Id: If8f4c75b65d5654703a68fe70277dc597773c85d PiperOrigin-RevId: 175737062
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Expose late-bound-attributes to Skylark.Gravatar cparsons2017-11-06
| | | | | RELNOTES: Late-bound attributes are exposed to skylark. This is a new API (`configuration_field()`) to depend on certain configuration-defined targets from skylark rules. PiperOrigin-RevId: 174534104