pulumi/pkg/codegen/dotnet
Will Jones cee6e49bf8
Clean up and test PCL object type annotations
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
2025-01-10 16:58:48 +00:00
..
gen_program_test Don't publish test code in `pkg/codegen` (#17517) 2024-10-09 11:09:54 +00:00
doc.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
doc_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
gen.go Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
gen_intrinsics.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
gen_program.go Clean up and test PCL object type annotations 2025-01-10 16:58:48 +00:00
gen_program_expressions.go Clean up and test PCL object type annotations 2025-01-10 16:58:48 +00:00
gen_program_test.go Don't publish test code in `pkg/codegen` (#17517) 2024-10-09 11:09:54 +00:00
gen_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
git_ignore.go Add GenerateProject to codegen (#9475) 2022-04-29 17:04:04 +01:00
importer.go feat: Add support for language specific settings for resources (#14308) 2023-11-29 16:35:08 +00:00
templates.go Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
utilities.go Fix up local dependencies in .NET codegen (#16902) 2024-08-09 14:43:51 +00:00
utilities_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00