| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
are difficult or impossible to verify by annotation processor.
RELNOTES: None.
PiperOrigin-RevId: 204540521
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 204505003
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 203977219
|
|
|
|
|
|
|
| |
error messaging and commenting when there's an unresolvable skylark type.
RELNOTES: None.
PiperOrigin-RevId: 203826504
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 202692405
|
|
|
|
|
|
|
|
|
|
| |
This will be enforced by annotation processor.
This will be followed up, along with turndown of mandatoryPositionals, by
removing the intepreter code which infers the correct number and type of parameters.
RELNOTES: None.
PiperOrigin-RevId: 202499089
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 201748802
|
|
|
|
|
|
|
| |
mandatoryPositionals is going away soon. While it is less verbose than the alternative, it does not allow for documentation to be specified (nor type-checking), and is thus inferior to the alternative. Killing mandatoryPositionals will also make the interpreter code cleaner.
RELNOTES: None.
PiperOrigin-RevId: 201566377
|
|
|
|
|
|
|
|
|
|
| |
useEnvironment
Unfortunately this doesn't work for all callers, namely NativeInfo objects, as they may have structField callables invoked from contexts that have no environment available.
RELNOTES[INC]: Skylark structs (using struct()) may no longer have to_json and to_proto overridden.
PiperOrigin-RevId: 201376969
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 199852932
|
|
|
|
|
|
|
| |
Also refactor away SkylarkModule.Resolver.
RELNOTES: None
PiperOrigin-RevId: 197955164
|
|
|
|
|
|
|
|
|
| |
well-defined.
Moving forward, if a class not already annotated with @SkylarkModule has SkylarkModule supertypes A and B, then it must be the case that A is a type of B, or B is a type of A. The skylark type of a given class is dictated by the *most specific* superclass annotated with @SkylarkModule.
RELNOTES: None.
PiperOrigin-RevId: 197946898
|
|
|
|
|
|
|
| |
with generic parameters
RELNOTES: None.
PiperOrigin-RevId: 197932265
|
|
|
|
|
|
|
| |
This dramatically improves documentation generation for JavaInfo and it makes it far more maintainable and extensible going forward.
RELNOTES: None.
PiperOrigin-RevId: 197619040
|
|
|
|
|
|
|
|
| |
This deprecates the old NativeProvider pattern.
The new pattern is demonstrated using AppleStaticLibraryInfo.
RELNOTES: None.
PiperOrigin-RevId: 194956883
|
|
|
|
|
|
|
|
|
|
|
|
| |
be treated as a callable skylark object.
This will allow Skylark Provider objects to be better specified.
For example, "JavaInfo" can have a fully-documented, fully-specified @SkylarkCallable method with selfCall=true to represent the method JavaInfo(), instead of being a subclass of BaseFunction and requiring a @SkylarkSignature annotation.
There are no usages of this pattern introduced in this CL, and also no updates to docgen to support the new pattern. These will be introduced in another CL.
RELNOTES: None.
PiperOrigin-RevId: 194088227
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 193962460
|
|
|
|
|
|
|
|
|
|
| |
@SkylarkCallable methods as representing constructors of other skylark types.
This change also demonstrates the new pattern on the global Label() constructor.
As an added bonus, it fixes documentation of that constructor. The old documentation used to read "Label.Label(...)" and the new documentation reads "Label(...)".
RELNOTES: None.
PiperOrigin-RevId: 193109338
|
|
|
|
|
|
|
|
|
| |
global skylark functions to use @SkylarkCallable instead of @SkylarkSignature.
Also migrate skylark's global "rule" function to @SkylarkCallable, thus demonstrating the new feature.
RELNOTES: None.
PiperOrigin-RevId: 193085313
|
|
|
|
|
|
|
|
|
|
| |
@SkylarkCallable.
@SkylarkSignature.parameters() treat named()=true for parameters regardless of whether named() was actually set to true, and thus for ease of migration we mark migrated parameters as legacyNamed() = true, which is currently semantically equivalent to named() = true.
We make a distinction so that it's easier to bulk fix these later.
RELNOTES: None.
PiperOrigin-RevId: 192477405
|
|
|
|
|
|
|
|
|
| |
parity with @SkylarkSignature.
This is necessary for several builtin functions that still use @SkylarkSignature, such as string format. These will be migrated in a future CL.
RELNOTES: None.
PiperOrigin-RevId: 192200282
|
|
|
|
|
|
|
| |
This involves enforcing additional compiletime restrictions on Param ordering and semantics.
RELNOTES: None.
PiperOrigin-RevId: 191927206
|
|
|
|
|
|
|
| |
documented=false.
RELNOTES: None.
PiperOrigin-RevId: 191112140
|
|
|
|
|
|
| |
This quiets some build warnings.
PiperOrigin-RevId: 190958692
|
|
|
|
|
|
|
|
|
|
|
| |
specifically get a semantics object
This is slightly redundant with useEnvironment, yes (as one can easily obtain the semantics object with Environment), but we intend on restricting useEnvironment so that structField=true methods cannot specify useEnvironment, but *can* specify useSkylarkSemantics.
In general, we can also ween off non structField methods to use useSkylarkSemantics instead of useEnvironment in cases where this is feasible.
RELNOTES: None.
PiperOrigin-RevId: 190082547
|
|
|
|
|
|
|
| |
Param.allowedTypes is used.
RELNOTES: None.
PiperOrigin-RevId: 190070309
|
|
|
|
|
|
|
|
| |
Previously, usage was fairly inconsistent.
From now on, if the @Param is mandatory, use defaultValue = "" instead.
RELNOTES: None.
PiperOrigin-RevId: 189777905
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 188201686
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
compile time.
RELNOTES: None.
PiperOrigin-RevId: 185432867
|
|
|
|
|
| |
RELNOTES:none
PiperOrigin-RevId: 179028810
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 149969486
MOS_MIGRATED_REVID=149969486
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 147456653
MOS_MIGRATED_REVID=147456653
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137500893
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=135956016
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=135144084
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=131576962
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128755445
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=126081020
|