pulumi/tests/testdata/codegen
Will Jones 17b66dfc56
Add a `call` intrinsic to PCL
In order for PCL to serve as an authoritative intermediate language for
Pulumi programs, it needs to be able to express all the concepts
available to a Pulumi program written in a high-level programming
language. Put another way, it must be capable of expressing all the
functionality exposed by the `ResourceMonitor` interface. Presently, the
ability to `Call` methods on component resources is not available in
PCL. This change adds a new `call` intrinsic to fix that.

`call` has three required arguments: the receiver (that will become the
`__self__` argument under the hood), the method name (that must exist in
the resource's `Methods` map in schema), and an object of arguments
(whose specifications must appear in the corresponding `Function` in the
schema). An example use of `call` might thus look as follows:

```hcl
resource "c" "pkg:index:Callable" {
  ...
}

output "o" {
  value = call(c, "method", { x = 1, y = 2 })
}
```

In order to type check and applications of `call` when binding PCL
programs, we use the recently powered-up annotations feature to look up
the resource node of the receiver from its expression. With this, we are
able to grab the schema and validate the method name and arguments.
While we add unit tests for binding programs that use `call`, this
change does not extend program generation or the conformance test suite.
This will be done in a subsequent set of changes.

Part of fixing pulumi/pulumi-java#262
2025-01-10 16:58:48 +00:00
..
array-of-enum-map Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
assets-and-archives Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
assets-and-archives-go-generics-only Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
assets-archives-pp Fix Python program generation for remote assets (#16556) 2024-07-02 13:34:10 +00:00
aws-eks-pp Fix l1-output-map Go conformance test (#17368) 2024-09-26 17:21:05 +00:00
aws-fargate-output-versioned-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
aws-fargate-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
aws-iam-policy-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-lambda-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
aws-optionals-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-resource-options-4.26-pp Add explict provider test to conformance tests (#16362) 2024-06-11 14:56:08 +00:00
aws-resource-options-5.16.2-pp Add explict provider test to conformance tests (#16362) 2024-06-11 14:56:08 +00:00
aws-s3-folder-pp [programgen] Unskip some Python and .NET tests (#16988) 2024-08-16 08:14:13 +00:00
aws-s3-logging-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
aws-secret-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-static-website-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
aws-webserver-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
azure-native-nested-types Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
azure-native-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
azure-native-v2-eventgrid-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
azure-sa-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
basic-unions-pp Fix python typed dicts to be enabled by default (#17322) 2024-09-20 20:53:06 +00:00
components-pp [sdk/program-gen] Implementing DeferredOutput for Go SDK and program-gen (#17885) 2025-01-04 18:47:30 +00:00
config-variables Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
config-variables-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
csharp-invoke-options-pp [PCL] Support generating invokes options from PCL for invokes (#17696) 2024-11-11 13:01:24 +00:00
csharp-plain-lists-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
csharp-typed-for-expressions-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
cyclic-types Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
dash-named-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
dashed-import-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
deferred-outputs-pp [sdk/program-gen] Implementing DeferredOutput for Go SDK and program-gen (#17885) 2025-01-04 18:47:30 +00:00
depends-on-array-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
different-enum Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
different-package-name-conflict Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
dynamic-entries-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
embedded-crd-types Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
empty-list-property-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
entries-function-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
enum-reference Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
enum-reference-python Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
external-enum Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
external-go-import-aliases Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
external-node-compatibility Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
external-python-same-module-name Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
external-resource-schema Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
functions-pp Fix l1-output-map Go conformance test (#17368) 2024-09-26 17:21:05 +00:00
functions-secrets Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
go-nested-collections Add StringMapMapMap to Go SDK (#17417) 2024-09-29 10:05:30 +00:00
go-overridden-internal-module-name [Go] Allow specifying dependencies for output invokes (#17791) 2024-12-10 13:08:57 +00:00
go-plain-ref-repro Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
hyphen-url Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
hyphenated-symbols Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
inline-invokes-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
internal-dependencies-go Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
interpolated-string-keys-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
invalid-go-sprintf-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
invoke-inside-conditional-range-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
iterating-optional-range-expressions-pp Fix apply in python (#16941) 2024-08-12 13:07:33 +00:00
kubernetes-operator-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
kubernetes-pod-pp Add a conformance test for preserving map keys (#17350) 2024-10-11 13:34:46 +00:00
kubernetes-template-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
kubernetes-template-quoted-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
kubernetes20 Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
legacy-names Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
logical-name-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
methods-return-plain-resource Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
modpath-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
multiline-string-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
mutually-dependant-components-pp [TF circular reference] Allow specifying mutually dependant components in PCL (#17761) 2024-11-14 22:09:55 +00:00
naming-collisions Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
nested-module Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
nested-module-thirdparty Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
optional-complex-config-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
other-owned Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
output-funcs Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
output-funcs-aws-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
output-funcs-edgeorder Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
output-funcs-go-generics-only Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
output-funcs-tfbridge20 Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
output-literals-pp Fix literal values in generated Go stack outputs (#16728) 2024-07-21 09:13:43 +00:00
output-name-conflict-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
overlay-supported-languages Fix python typed dicts to be enabled by default (#17322) 2024-09-20 20:53:06 +00:00
plain-and-default Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
plain-and-default-go-generics-only Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
plain-object-defaults Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
plain-object-disable-defaults Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
plain-schema-gh6957 Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
provider-config-schema Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
provider-type-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
pulumi-stack-reference-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
python-regress-10914-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
python-regress-14037-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
python-reserved-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
python-resource-names-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
python-typed-dict-disabled-setuppy Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
python-typed-dict-pyproject Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
python-typed-dict-setuppy Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
random-pet-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
read-file-func-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
regress-8403 Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
regress-11176-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
regress-go-8664 Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
regress-go-10527 Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
regress-go-12971 Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
regress-go-15478 Ensure package generation for Go SDKs doesn't panic when encountering overly nested arrays or maps of primitive types (#15680) 2024-03-14 14:21:15 +00:00
regress-node-8110 Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
regress-node-12507-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
regress-py-12546 Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
regress-py-12980 Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
regress-py-14012 Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
regress-py-14539 Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
regress-py-17219 Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
regress-py-tfbridge-611 Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
replace-on-change Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
resource-args-python Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
resource-args-python-case-insensitive Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
resource-property-overlap Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
retain-on-delete-pp Add explict provider test to conformance tests (#16362) 2024-06-11 14:56:08 +00:00
schema Add ability to constrain supported languages of resource and function overlays (#16579) 2024-07-09 14:54:50 +00:00
secrets Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
secrets-go-generics-only Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
self-referencing-components-pp [TF circular reference] Allow specifying mutually dependant components in PCL (#17761) 2024-11-14 22:09:55 +00:00
simple-enum-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-enum-schema-go-generics-only Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
simple-methods-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-methods-schema-single-value-returns Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-plain-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-plain-schema-go-generics-only Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
simple-plain-schema-with-root-package Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-range-pp Use pulumi.Sprintf in program gen (#16852) 2024-08-01 09:24:25 +00:00
simple-resource-schema Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-resource-schema-custom-pypackage-name Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
simple-resource-with-aliases Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
simple-schema-pyproject Update minimum SDK versions for Node.js and Python (#17997) 2024-12-10 18:14:38 +00:00
simple-splat-pp Fix l1-output-map Go conformance test (#17368) 2024-09-26 17:21:05 +00:00
simple-yaml-schema Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
simplified-invokes Codegen for .NET InvokeOutputOptions (#17890) 2024-12-11 20:07:57 +00:00
simplified-invokes-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
single-or-none-pp Enable l1-output-number conformance test for Go (#16753) 2024-07-22 17:12:28 +00:00
snowflake-python-12998-pp Generate TypedDict input types by default (#16704) 2024-07-23 11:26:54 +00:00
string-enum-union-list-pp [program-gen] Fix enum resolution from types of the form Union[string, Enum] and emit fully qualified enum cases (#15696) 2024-03-15 17:49:12 +00:00
synthetic-resource-properties-pp [programgen/go] Fix importing module names that aren't lower-case (#18113) 2024-12-25 16:04:40 +00:00
third-party-package-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
throw-not-implemented-pp Enable l1-output-number conformance test for Go (#16753) 2024-07-22 17:12:28 +00:00
transpiled_examples Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
traverse-union-repro-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
typed-enum-pp Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
unions-inline Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
unions-inside-arrays Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
unknown-invoke-pp Fix l1-output-map Go conformance test (#17368) 2024-09-26 17:21:05 +00:00
unknown-resource-pp [go/program-gen] Do not emit index module for resources without a schema (#16588) 2024-07-08 14:57:23 +00:00
urn-id-properties Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
using-dashes-pp [Go/conformance] Fix l2-primitive-ref and l2-resource-asset-archive (#17389) 2024-09-26 12:44:12 +00:00
using-object-as-input-for-any-pp [program-gen/go,dotnet] Fixes emited code for object expressions assigned to properties of type Any (#15770) 2024-03-24 00:06:57 +00:00
using-shared-types-in-config Update dotnet to 3.71.1 (#18084) 2024-12-20 12:52:58 +00:00
.gitignore Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
auto-deploy-0.0.1.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-4.15.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-4.26.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-4.36.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-4.37.1.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-5.4.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-5.16.2.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
aws-native-0.99.0.json [program-gen/go,dotnet] Fixes emited code for object expressions assigned to properties of type Any (#15770) 2024-03-24 00:06:57 +00:00
aws-static-website-0.4.0.json [program-gen] Fix panic when generating programs for MLC packages using external types (#15605) 2024-03-10 17:23:15 +00:00
awsx-1.0.0-beta.5.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
azure-4.18.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
azure-native-1.28.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
azure-native-1.29.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
azure-native-1.56.0.json [program-gen] Fix enum resolution from types of the form Union[string, Enum] and emit fully qualified enum cases (#15696) 2024-03-15 17:49:12 +00:00
azure-native-2.41.0.json [go/program-gen] Implement importPathPattern in Go language options to override emitted paths in generated Go programs (#16267) 2024-05-30 19:51:12 +00:00
basic-unions-0.1.0.json [program-gen/tests] Replace discriminated unions test program with a program from a synthetic schema of basic unions (#15771) 2024-03-28 10:49:27 +00:00
component-13.3.7.json Add a `call` intrinsic to PCL 2025-01-10 16:58:48 +00:00
docker-3.1.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
docker-4.0.0-alpha.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
eks-0.37.1.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
eks-0.40.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
enum-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
google-native-0.18.2.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
google-native-0.27.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
kubernetes-3.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
kubernetes-3.7.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
kubernetes-3.7.2.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
lambda-0.1.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
localref-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
other-0.1.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
plain-properties-1.0.0.json Fix marshalling of plain properties (#16812) 2024-07-26 21:36:22 +00:00
random-4.2.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
random-4.3.1.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
random-4.11.2.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
range-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
recursive-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
remoteref-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
snowflake-0.66.1.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
splat-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
std-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
synthetic-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
tls-4.10.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
types.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00
using-dashes-1.0.0.json Move codegen testdata (#15549) 2024-03-06 20:36:50 +00:00