mirror of https://github.com/pulumi/pulumi.git
cee6e49bf8
In our model of PCL based on HCL syntax, we define a number of types according to Pulumi's type system. Among these is `ObjectType`, the type of objects of the form `{ k_1: t_1, ..., k_n: t_n }`, where each key `k_i` maps to a nested type `t_i`. Object types crop up all over the place -- as sets of resource input properties, resource outputs themselves, and as arguments to function calls, for instance. Because object types are so prevalent, it is often useful to be able to link them to metadata about their intended use. For instance, in code generation, we might like to know if an object type corresponds to a "bare" object literal or an instance of some named class. To this end, object types support _annotations_, and such annotations are used in e.g. .Net and Python codegen as hinted above. In preparation for making wider use of annotations (e.g. for adding `call` to PCL, which requires us to know about expressions' linked resource types), this change cleans up the interface for working with annotations and adds a number of test cases. Additionally, code that is likely currently brittle due to only checking the first of a set of annotations (see the various uses of `[0]` in the diff) has been made more robust, possibly fixing some rare bugs/edge cases. Working towards closing pulumi/pulumi-java#262 |
||
---|---|---|
.. | ||
gen_program_test | ||
doc.go | ||
doc_test.go | ||
gen.go | ||
gen_intrinsics.go | ||
gen_program.go | ||
gen_program_expressions.go | ||
gen_program_test.go | ||
gen_test.go | ||
git_ignore.go | ||
importer.go | ||
templates.go | ||
utilities.go | ||
utilities_test.go |