aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skylarkinterface
Commit message (Collapse)AuthorAge
* Fix light typo in java docs.Gravatar dbabkin2017-12-14
| | | | | RELNOTES:none PiperOrigin-RevId: 179028810
* Break dependency on vfs from the interface of syntax and cmdline.Gravatar tomlu2017-11-06
| | | | | | | | These libs are exposed externally, implying that the vfs is also exposed externally. We break out PathFragment from vfs to still use this in their interface. This class is a much smaller dependency than the entire vfs. PiperOrigin-RevId: 174729373
* Remove deprecated legacy string representations of Skylark objectsGravatar vladmos2017-10-13
| | | | | | | | RELNOTES[INC]: The flag --incompatible_descriptive_string_representations is no longer available, old style string representations of objects are not supported anymore. PiperOrigin-RevId: 171952621
* Make SkylarkValue instances mutable by defaultGravatar vladmos2017-07-11
| | | | | | | | | | Simplify the code by providing the default implementation of `SkylarkValue$isImmutable` that always returns false. All objects are considered mutable unless their `isImmutable` method is overridden. This change doesn't affect the current behavior. PiperOrigin-RevId: 161422029
* Clean up string representations for labelsGravatar vladmos2017-07-05
| | | | | | | | | | | If --incompatible_descriptive_string_representations is passed, labels are converted to strings using `repr` differently: `Label("//package:name")` instead of `"//package:name"` This CL doesn't affect representations of other object types but provides the necessary infrastructure for it. PiperOrigin-RevId: 160955284
* Refactor PrinterGravatar vladmos2017-07-03
| | | | | | | It's now easier to customize Printer if in different situations objects should be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str. PiperOrigin-RevId: 160635154
* Fix broken linkGravatar Jon Brandvein2017-03-14
| | | | | | -- PiperOrigin-RevId: 149969486 MOS_MIGRATED_REVID=149969486
* Fix the documentation of set/depsetGravatar Vladimir Moskva2017-02-14
| | | | | | -- PiperOrigin-RevId: 147456653 MOS_MIGRATED_REVID=147456653
* Fix links for provider and configuration fragment docsGravatar Googler2016-11-16
| | | | | | | Change it to use relative links so it works for different deployments, and have the link for providers note that providers are attributes of a Target, not of ctx. -- MOS_MIGRATED_REVID=139207051
* Change our URL to bazel.buildGravatar Damien Martin-Guillerez2016-10-28
| | | | | -- MOS_MIGRATED_REVID=137500893
* Refactor getParentWithSkylarkModule() into SkylarkInterfaceUtilsGravatar Jon Brandvein2016-10-13
| | | | | -- MOS_MIGRATED_REVID=135956016
* 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 9c25afe750a937b2152c21a93effc8b9ba82c27b.Gravatar Ulf Adams2016-10-11
| | | | | | | | | | | | | | | *** Reason for rollback *** Seems to break some parts of aspects. *** Original change description *** Make EvalUtils.getDataTypeNameFromClass() look for @SkylarkModules in parent 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 (which would lead to redundant documentation being generated). -- MOS_MIGRATED_REVID=135786137
* Make EvalUtils.getDataTypeNameFromClass() look for @SkylarkModules in parent ↵Gravatar Jon Brandvein2016-10-05
| | | | | | | | | 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 (which would lead to redundant documentation being generated). -- MOS_MIGRATED_REVID=135161653
* Refactor getAnnotationFromParentClass() to a new SkylarkInterfaceUtils moduleGravatar Jon Brandvein2016-10-05
| | | | | -- MOS_MIGRATED_REVID=135144084
* Replace js provider methods with named parameters.Gravatar Pedro Liberal Fernandez2016-08-29
| | | | | -- MOS_MIGRATED_REVID=131576962
* Enable named arguments for SkylarkCallable annotationGravatar Damien Martin-Guillerez2016-08-04
| | | | | | | | | | This just add the support on the Skylark side, the documentation generator still needs to be updated. -- Change-Id: Ic26547cdb8d2c5c01839a4014c10f1b9b209b92b Reviewed-on: https://bazel-review.googlesource.com/#/c/4247/ MOS_MIGRATED_REVID=129328278
* Fix a broken linkGravatar Googler2016-07-29
| | | | | -- MOS_MIGRATED_REVID=128755445
* Display all allowed types for SkylarkSignature Params that allow multipleGravatar David Chen2016-07-05
| | | | | | | | | | | | | | | | | | | types. Fixes #921 Certain parameters, such as the `executable` and `command` parameters of ctx.action, allow multiple types. However, the allowed types are not enumerated in the SkylarkSignature annotation, causing the generated Skylark Library document to not display any type information for those params. This change adds a new field, `allowedTypes`, to `SkylarkSignature` that is a list of `ParamType` objects. If the param can accept multiple types, then `type` is set to `Object.class`, and `allowedTypes` is set to the list of types that can be accepted. -- MOS_MIGRATED_REVID=126617047
* Reorganize Skylark Reference documentation.Gravatar Dmitry Lomov2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126081020
* Use only one list of parameters for SkylarkSignatureGravatar Damien Martin-Guillerez2016-06-14
| | | | | | | | | | | | | Optional and named parameters are now specified using `defaultValue` and `named` (and `positional`). The new structure allow for parameters that are both named and positional (which was forbidden before). This new structure will be used to give the @SkylarkCallable annotation the possibility to provide named and default arguments. It should be a functional no-op for Bazel users. -- MOS_MIGRATED_REVID=124821455
* Extract the @Param annotation from @SkylarkSignatureGravatar Damien Martin-Guillerez2016-06-10
| | | | | | | | The @SkylarkCallable annotation is very limited and to extend it it is best to share a similar API than the @SkylarkSignature annotation. -- MOS_MIGRATED_REVID=124473056
* Basic Java documentation of Skylark AnnotationsGravatar Damien Martin-Guillerez2016-06-09
| | | | | | | | | | @SkylarkCallable and @SkylarkSignature were undocumented, making it hard for the developer to understand these annotations. This change add basic documentation for them. -- MOS_MIGRATED_REVID=124461858
* Replaced arrays by single value for extra{Positionnals,Named} in ↵Gravatar Damien Martin-Guillerez2016-06-08
| | | | | | | | | | SkylarkSignature Those arrays were checked to never have more than one value so use an empty name instead of the empty array. This simplify comprehension of the API. -- MOS_MIGRATED_REVID=124330918
* ConfigurationFragmentPolicy: assume Skylark names, allow merging.Gravatar Michael Staib2016-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for allowing aspects to have their own configuration fragments specified, allow ConfigurationFragmentPolicy.Builder to merge with built policies more easily, setting up SetMultimaps in place of maps of sets. This changes how named (Skylark) fragments are declared in the RuleContext builder, hopefully to be a bit easier to write. In order to do this, make SkylarkModuleNameResolver the only name resolver in use (because it is the only name resolver which exists) so as to not worry about collisions of different name resolvers. This also changes isLegalConfigurationFragment's one-argument form to mean "legal in ANY configuration" rather than "legal in the target (NONE) configuration", as that is how it's used by TransitiveTargetFunction. Uses of it to mean the latter have been revised to be more explicit. Also in this CL: * refactor ConfigurationFragmentPolicy to enforce its contracts about which ConfigurationTransitions are legal * use containsEntry or containsValue rather than looking in get(key) or values() for the configuration fragment multimaps * add tests for ConfigurationFragmentPolicy * make SkylarkModuleNameResolver a static method -- MOS_MIGRATED_REVID=112191439
* Move annotation classes used for referencing framework Java classes from ↵Gravatar John Field2015-12-16
Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies. While we're here: - Removed a couple of unused BUILD deps flagged in []. - Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and clarify the intent of the test. -- MOS_MIGRATED_REVID=110360763