Commit graph

228 commits

Author SHA1 Message Date
Ian Wahbe 67303e1b99
Run type checker against all languages (#7931)
We run the best static check we can on generated code, ensuring that it is valid. 

* Run type checker against all languages (not docs)

* Fix package location, add some deps for schemas

* More tests passing

* These tests finally work

* Make linter happy

* Fix tests for merge from master

* Opt out of input-collision(nodejs) test

* Get more visibility into testing nodejs

* Fix type assumption

* Specify ts-node version

* Retrofit typescript dependencies for node14

* Give each go instance it's own module

* Attempt to diagnose remote go mod init failure

* Provide root for go mod init

* Make linter happy
2021-09-15 09:49:36 -07:00
Ian Wahbe 5e65204463
Fixup for 7874 (#7921)
* Fix some nits from 7874

This was a premature merge

* Fix #7940

We don't surface recursion warnings if there is no child where `replaceOnChanges` is set.
2021-09-10 14:56:56 -07:00
Anton Tayanovskyy c247f6e283
Fix 7913 Python codegen issue with double-quote inside docstrings (#7914)
* Introduce a test that showcases the invalid generated code

* Use shared printComment function

* Check for triple quote escaping

* Accept go

* Accept dotnet

* Accept nodejs

* Move codegen exampe into an existing schema

* Add CHANGELOG entry
2021-09-08 14:52:54 -04:00
Ian Wahbe 08b428ae96
Add replaceOnChange to schema (#7874)
* Add replaceOnChange to schema

* replaceOnChange at generate time for resources

* ReplaceOnChanges sees through optional types

* Correctly deal with map,array,object,resource type

This is responding to PR clarifications from @justinvp and @lblackstone.

* Update CHANGELOG_PENDING.md

* Detect recursively defined objects

* Display recursion warning

* Check which recursive structures fail

* Add internal logic tests for replaceOnChanges

* Add tests
2021-09-07 22:23:30 -07:00
Evan Boyle 95aa47d3c6
[codegen/go] detect and avoid collisions in resource and type code generation (#7857) 2021-09-03 19:42:45 -07:00
Anton Tayanovskyy 4380a63ad9
Implement 5758 {fn}_output codgen for Python (#7825)
* Implement 5758 {fn}_output codgen for Python

* Fix lint issues

* Accept codegen changes in expected examples

* Test and fix positional arg handling

* Add parameter descriptions to illustrate docstring codegen

* Generate docstrings

* Accept doc changes in expected go codegen file

* Use platform-agnostic API to drive Python tests
2021-08-30 16:52:58 -04:00
Anton Tayanovskyy eef208633c
5758 for Go (#7784)
* Go support for 5758 - resurrect stale PR

* Fix listStorageAccountKeys test

* Check err so linter is satisfied

* Use all the examples

* Accept codegen results

* Regenerate with PULUMI_IGNORE_AMBIENT_PLUGINS=1

* Compile and test generated code as part of the test suite

* Add a CHANGELOG entry

* Remove temp test marker

* Shorten output type name

* Simplify code

* Add issue link

* Accept more codegen changes

* Use the suggested format for linking an issue
2021-08-23 16:46:09 -04:00
Evan Boyle a0e402118f
[codegen/go] Fix generation of nested collection types and remove invalid args types (#7779) 2021-08-18 10:04:07 -07:00
Justin Van Patten 2b97340133
[codegen/docs] Emit docs for methods (#7731) 2021-08-12 14:31:15 -07:00
Mikhail Shilkov 9c501b5bed
Fix Go generation for top-level module resources in a provider with a dash in name (#7692)
* Fix Go generation for top-level module resources in a provider with a dash

* Add tests
2021-08-10 08:58:24 +03:00
Pat Gavlin 594fca76d2
[codegen/go] Unify some output type generation (#7662)
These changes take a step towards simplifying and unifying the
generation of output types in the Go SDKs, especially for pointer,
array, and map outputs. This code was previously duplicated amongst the
various specialized output type generators, which led to inconsistencies
between the various implementaitons.

This is prep work for fixing #7595.
2021-08-02 13:43:24 -07:00
Anton Tayanovskyy ab7d4263b4
Fix IDE completion issues for lazy imports (#7487)
* Improve codegen import code completion python experience

* Accept codegen changes
2021-07-30 16:35:02 -04:00
Justin Van Patten 88305ba896
Update test data for docs template change (#7678) 2021-07-29 10:15:03 -07:00
Pat Gavlin 1409d88438
[codegen/*] Add join and toBase64 functions. (#5012)
Co-authored-by: Komal Ali <komal@pulumi.com>
2021-07-28 20:41:23 -07:00
Komal fddeea8a88
[codegen] Unify program codegen testing (#7657)
* ProgramGen test driver

* Refactor to avoid exporting hcl2 entities
2021-07-27 18:00:39 -07:00
Justin Van Patten 1141dd4c98
[codegen/dotnet] Emit resource methods (#7606) 2021-07-27 16:42:17 -07:00
Pat Gavlin 91683242d0
[codegen/go] Unify input method generation. (#7643)
The code for input method generation was duplicated. These changes
remove the duplicated code.

This is prep for fixing #7595.
2021-07-26 19:23:17 -07:00
Pat Gavlin a4ee050afc
[sdk/dotnet] Fix collections in input unions. (#7601)
Collection types nested inside of Input<Union<...>> types need to abide
by the usual rules for collection types nested inside of input types.
These changes replace the use of the generic SimplifyInputUnion with a
.NET-specific simplifyInputUnion that does not remove Input types
inside of a union if those Input types wrap collection types. Retaining
these Input types allows the usual logic for handling
Input<Collection<...> types in typeString to kick in.

Fixes #7569.
2021-07-22 13:11:33 -07:00
Komal a1b7f64bdd
[docgen/go] - Fix go docgen links for pulumi types (#7558) 2021-07-20 15:57:48 -07:00
Komal 5de09409f6
[codegen/dotnet] - Dynamic provider config getters (#7549) 2021-07-20 10:22:45 -07:00
Mikhail Shilkov 6fbe6ad651
Set UseSharedCompilation to false (#7577) 2021-07-20 15:50:37 +02:00
Pat Gavlin 28b1a25629
[codegen/python] Improve program gen perf. (#7547)
- Only build casing tables once per package
- Right-size buffers in name generation

These changes lead to a significant speedup in example gen for
azure-native.
2021-07-16 15:45:00 -07:00
James Nugent e6981898eb
Update package import handling for Node.js (#7474)
* Allow non-pulumi imports for Node.js

Currently the code generator is assuming that Node.js dependencies are
following a naming scheme that is prefixed with `pulumi/`. If this is
not the case the generated import statement is incorrect.

This commit adds a map `ProviderNameToModuleName` to the language
definition that allows you to map the name of the extracted provider of
a dependency to a module name that the generator now uses to create the
import statement.

* Prepend "pulumi" to import names in Node.js SDK

It is common when writing multi-language components to have a module
name which conflicts with a provider name. This can produce unusable
code, since you cannot simultaneously import a package as `aws` and have
a namespace `aws`, for example.

This commit makes this situation much less likely, by renaming the
imported identifier for providers to `pulumiX` where it would
previously have been `x`.

This has an unfortunate side effect of making the examples in the
documentation slightly uglier, since import statements for third-party
packages are now of the form `import * as pulumiAws from "@pulumi/aws"`.
I don't see a way to discern whether code generation is for SDKs vs
examples however, and short of plumbing that through, I don't see a way
around this, so test expectations are updated accordingly.

Co-authored-by: Ben Schiborr <bschiborr@apple.com>
2021-07-16 10:27:20 -07:00
Komal 490e9cf477
[codegen/nodejs] - Dynamic provider config getters (#7530) 2021-07-16 09:52:45 -07:00
Komal 01321187a9
[codegen/python] - Fix required vs default values in provider config (#7536) 2021-07-16 09:48:03 -07:00
Justin Van Patten cb564608b1
[codegen/nodejs] Fix missing args param (#7539) 2021-07-15 16:33:32 -07:00
Justin Van Patten df20cc551d
Fix codegen tests (#7531)
The PR for these codegen changes was opened before these tests were added.
2021-07-14 22:43:56 -07:00
James Nugent 257c176dc0
Use variable over placeholder for Python version (#7479)
This commit modifies the generation of `setup.py` to use Python
variables as the source for the package version and plugin version
instead of placeholder strings. This has the effect of making the
packages installable via the `-e` flag directly from their source
directory rather than requiring a build step, which is useful while
developing a plugin and examples in tandem.
2021-07-14 16:44:22 -07:00
James Nugent 59a320f050
Stop producing pointers for map and slice elements (#7472)
This commit modifies Go program generation to prevent producing array
and slice object elements as pointers in args structures, which fails at
runtime and does not make sense in any case. For example, in the case of
a type defined like this in schema:

```json
"statements": {
  "type": "array",
  "items": {
    "$ref": "/aws/v4.8.0/schema.json#/types/aws:iam/getPolicyDocumentStatement:getPolicyDocumentStatement"
  }
},

```

The following (which fails at runtime) was produced before this change:

```go
Statements []*iam.GetPolicyDocumentStatement `pulumi:"statements"`
```

And the following is produced after after this change:

```go
Statements []iam.GetPolicyDocumentStatement `pulumi:"statements"`
```

Test expectations are updated accordingly.
2021-07-14 15:12:25 -07:00
James Nugent c94f923774
Fix Node.js intermediate module import path generation (#7473)
This commit fixes code generation for intermediate module paths to
produce valid TypeScript identifiers.

Before this change, the following (non-compilable) import was produced
in `./jetstack/certmanager/acme`:

```
import * as jetstack/certmanager/acme/v1alpha2 from "./jetstack/certmanager/acme/v1alpha2";
```

After this change, the following import is produced:

```
import * as v1alpha2 from "./v1alpha2";
```

This example is repeated at each level of the module tree. Test
expectations are adjusted to reflect this change.
2021-07-14 15:12:15 -07:00
Komal 083fc64ff5
[codegen/python] - Implement dynamic config-getters (#7447) 2021-07-14 14:26:50 -07:00
Pat Gavlin 067b630366 [codegen] Update baselines.
Two PRs that touched codegen raced and left the baselines in a bad
state.
2021-07-13 19:30:28 -07:00
Pat Gavlin 4d1ca1596b
[codegen/schema] YAML {un,}marshaling support. (#7509)
These changes add support for unmarshaling and marshaling package
schemas using YAML instead of JSON. Language-specific data is
canonically JSON. Users of the `*Spec` types will need to update the
types of the the their `Language` values to use the new
`schema.RawMessage` type instead of `json.RawMessage`: the former has
support for YAML while the latter does not.
2021-07-13 16:41:40 -07:00
Komal 0e3665f9bd
Emit To[ElementType]PtrOutput methods for go enum output types (#7499) 2021-07-13 12:54:19 -07:00
Pat Gavlin 82c631bb2b
[codegen/nodejs] Fix required input annotations. (#7497)
Ensure that required input properties that are _not_ mentioned in the
NodeJS-specific required inputs metadata are made optional.
2021-07-13 09:39:58 -07:00
James Nugent 1afb620706
Add newline to generated package.json files (#7480)
This commit adds a newline to the end of the package.json files
generated by Pulumi codegen, such that they can be installed in place
without modification.
2021-07-09 15:46:27 -07:00
Pat Gavlin 8cf588d408
[codegen] Add more type tests. (#7475)
- Add another regression test for #7454
- Add tests for singly-nested plain collections
- Fix a bug when binding {"type": "object"}.
2021-07-09 13:33:15 -07:00
Pat Gavlin d07b325138
[codegen] Add type name generation tests. (#7470)
The inputs and expected outputs for the tests are encoded using a
schema. Each property present in the schema forms a testcase; the
expected outputs for each language are stored in each property's
`Language` field with the language name "test". Expected outputs can be
regenerated using `PULUMI_ACCEPT`.
2021-07-09 10:23:10 -07:00
Christian Nunciato bc7a88e7d3
Change resource-docs filenames to _index.md (#7450)
* Change resource-docs filenames to _index.md
* Rename test files
2021-07-08 18:07:05 -07:00
Pat Gavlin 6887f76ff7
[codegen/test] Optionally skip testcases. (#7463)
Add support for skipping testcases when run against specific languages.
2021-07-08 13:54:03 -07:00
Justin Van Patten ccae7c80f8
[codegen/nodejs] Emit resource methods (#7378) 2021-07-07 20:16:42 -07:00
Justin Van Patten fd49c338f4
[codegen/go] Emit resource methods (#7438) 2021-07-07 20:11:40 -07:00
Komal 8db30bdc14
[codegen/go] - Inputty Go enums (#7383) 2021-07-07 16:25:26 -07:00
Justin Van Patten 1c7cd99ecd
[codegen/python] Emit resource methods (#7364) 2021-07-07 06:57:18 -07:00
Pat Gavlin 46400d502b
[codegen] Unify SDK codegen testing (#7433)
Rather than duplicating the list of tests and codegen driver across each
SDK, move its definition into `pkg/codegen/internal/test`. This has a
few notable benefits:

- All SDK code generators will be tested against each test. Though some
  tests may exercise a particular code generator more than others, the
  extra coverage will be generally beneficial.
- Adding a new test is simpler, as only a single file needs to be
  changed.
- All SDKs now honor the `PULUMI_ACCEPT` environment variable for
  updating baselines.
- Codegen tests now validate all generated files instead of only a
  particular subset.
2021-07-06 15:40:53 -07:00
Komal e0902d2489
[codegen/python] - Include python enum docstrings (#7374) 2021-06-28 15:06:50 -05:00
James Nugent d525a8b331
Add complete third-party Python module and fix setup.py indentation (#7362)
Co-authored-by: Komal <komalsali@gmail.com>
2021-06-24 16:01:49 -05:00
Pat Gavlin 7b1d6ec1ac
Reify Input and Optional types in the schema type system. (#7059)
These changes support arbitrary combinations of input + plain types
within a schema. Handling plain types at the property level was not
sufficient to support such combinations. Reifying these types
required updating quite a bit of code. This is likely to have caused
some temporary complications, but should eventually lead to
substantial simplification in the SDK and program code generators.

With the new design, input and optional types are explicit in the schema
type system. Optionals will only appear at the outermost level of a type
(i.e. Input<Optional<>>, Array<Optional<>>, etc. will not occur). In
addition to explicit input types, each object type now has a "plain"
shape and an "input" shape. The former uses only plain types; the latter
uses input shapes wherever a plain type is not specified. Plain types
are indicated in the schema by setting the "plain" property of a type spec
to true.
2021-06-24 09:17:55 -07:00
Komal 0f97a9bdfa
Fix python module nesting (#7353) 2021-06-22 15:43:21 -07:00
Justin Van Patten 4e9e017cd2
[codegen/python] Rename conflicting ResourceArgs classes (#7171)
Python resource constructor overloads were recently added that accept a
`<Resource>Args` class for input properties, as an alternative to the
other constructor overload that accepts keyword arguments. The name of
the new args class is the name of the resource concatenated with an
`Args` suffix.

Some providers (e.g. Kubernetes, Azure Native, and Google Native) have
input types with the same name as resources in the same module, which
results in two different `<Resource>Args` classes in the same module.

When you try to use the new args class with the constructor, e.g.:

```python
pulumi_kubernetes.storage.v1.StorageClass(
            resource_name='string',
            args=pulumi_kubernetes.storage.v1.StorageClassArgs(...),
            opts=pulumi.ResourceOptions(...),
)
```

You run into an error, because
`pulumi_kubernetes.storage.v1.StorageClassArgs` is actually referring to
the existing input type rather than the intended `StorageClassArgs`
class for the constructor arguments.

Having the duplicate classes hasn't broken existing usage of the input
type because we "export" all the input types for a module _after_ all
the resources and resource args classes are exported, so the input type
just ends up "overwriting" the duplicate resource args class.

Other languages don't have this problem because the input type is either
in it's own module/namespace (e.g. Node.js and .NET) or a different name
is used for the input type (Go). But with Python, the input types and
resources are all available in the same module.

To address this for Python, when there is an input type in the same
module with the same name as the resource, the args class for the
resource will be emitted as `<Resource>InitArgs` instead of
`<Resource>Args`.
2021-06-10 10:41:49 -07:00
Justin Van Patten de871cec8e
Add schema support for methods (#7141) 2021-06-10 09:47:25 -07:00
Justin Van Patten f1fa3a141d
[codegen/dotnet] Fix plain properties (#7180)
Fix the generated C# code for plain properties:

- Value types should not be initialized with `= null!`
- Arrays and maps should be `List<T>` and `Dictionary<string, TValue>`
2021-06-04 09:25:20 -07:00
Mike Metral 672feff428
Fix Go init.go codegen to be govet compliant (#7195)
Co-authored-by: Mike Metral <mmetral@apple.com>
2021-06-04 13:57:04 +03:00
Justin Van Patten ed9124972c
[codegen/go] Fix emitted type of resources and types (#7158)
In Go, resource types are modeled as pointers, but there were cases where the type was not being emitted as a pointer, leading to panics and marshaling errors in programs. Additionally, array and map values that are external references were being emitted as pointers, but only resources should be pointers (not types), regardless of whether the resource type is external or local.
2021-05-27 16:02:19 -07:00
Levi Blackstone aeb6857f7f
[codegen] Encrypt input args for secret properties (#7128)
The output side was already handled using the
addionalSecretOutputs property. This change
ensures both inputs and outputs are encrypted
in the state.
2021-05-26 16:00:51 -06:00
Evan Boyle b4323ea437
Relax readonly requirement for generated nodejs resource args (#6980) 2021-05-06 21:59:40 -07:00
James Nugent 73c8cc3ec5
Permit override of Python package naming (#6971)
This commit adds a new language option for Python generation to specify
the package name instead of using `pulumi_x` where x is the name defined
in the schema.

A new test is added, and this has also been shown to produce no diff
when run against `pulumi-eks`.
2021-05-06 11:18:14 -07:00
Mikhail Shilkov 1378c45849 Discriminated unions in schema and programgen 2021-05-05 10:01:22 +02:00
Christian Nunciato 3b8a0dd3e3
Remove leading and trailing whitespace in resource properties (#6959)
* Remove leading and trailing whitespace in resource properties

* Make tests pass

* Add PULUMI_ACCEPT support to docs gen tests

* Handle a couple more places

Co-authored-by: Pat Gavlin <pat@pulumi.com>
2021-05-04 17:59:30 -07:00
James Nugent 93d7057f80
[codegen/go] Respect baseImportPath in Go SDKs (#6866)
If `rootPackageName` is set, we can look for the version in the
baseImportPath rather than at a location based on the package name -
which currently fails if every component is not named `pulumi-*`. To err
on the side of caution, this method is only used for packages where
`rootPackageName` is set, meaning existing SDKs retain their current
behavior.

The new behavior is confirmed via the test added in #6862.
2021-04-29 17:09:05 -06:00
Anton Tayanovskyy 6f1ea08993
Import subpackages lazily (#6827)
* Import subpackages lazily

* Tighten up lazy_import impl

* Eagerly register resources, but lazily load their impl

* Add CHANGELOG entry

* Satisfy lint

* Restore mypy behavior so the change is not breaking

* Fix golden tests
2021-04-29 16:08:22 -04:00
James Nugent f73ec2fc71
[codegen/go] Permit production of flat Go packages (#6862)
When working in a monorepo environment, it can be desirable to generate
Go SDKs into a structure less like the upstream SDKs, and more like
this:

github.com/x/mymonorepo/sdk/go/package-name

Where `package-name` is also the root of a Go module. Since
`package-name` is not a valid package name in Go, it's also desirable to
be able to choose a replacement name and reduce the amount of nesting.

This commit adds a new Go option to the schema, `rootPackageName`, which
can be used to modify the generated root package name (e.g. to
`mypackage` instead of `package-name`, and remove the additional layer
of nesting.

Test coverage is added to ensure that the correct file structure and
package names are generated.
2021-04-29 13:30:01 -06:00
Pat Gavlin 6a33b4b7ee
Distinguish between inputty and plain args types. (#6811)
These changes fix a regression introduced by #6686 that caused the SDK
code generators for .NET, Python, and Typescript to omit definitions for
plain object types. This regression occurred because #6686 drew a
clearer line between types used as resource arguments and types used
as function arguments, but conflated "resource arguments" with "inputty
types". This caused the code generators to generate inputty types for
any types used as resource arguments, even those that are used for
plainly-typed properties.

Fixes #6796.
2021-04-19 16:40:39 -07:00
Pat Gavlin 89595a3365
Do not wrap types in Input<> when generating docs. (#6812)
Just what it says on the tin. These changes also add more expansive
tests for documentation generation using our existing example schemas.

Fixes #6797.
2021-04-19 14:05:23 -07:00
Pat Gavlin 1cc084dc0e
Fix inconsistent object type naming. (#6686)
See #6200 for a complete description of the issue. In short, we generate
inconsistent names for object types depending on whether or not they are
transitively reachable from resources or functions, which risks
unintentional breaking changes due to schema updates.

1. Name "input" types differently: `TArgs` for a type that is used in
   resource inputs, having `Input<T>` properties, and `T` for a type
   that is used in invoke inputs. The same schema type can produce both.

2. Always keep the name `T` for output types, avoid appending `Result` to
   the name.

3. As needed, introduce a flag in the existing providers' schemas to avoid
   breaking changes. Consider removing it on a major version bump.

Fixes #6200.
2021-04-15 19:03:28 -07:00
Justin Van Patten f7f33d92af [codegen/python] Remove deprecated __name__ and __opts__ args (#6765)
These have been deprecated for a very long time and it's a trivial change to remove them from the generated code. Let's clean this up for the 3.0-based providers.
2021-04-14 19:32:18 +01:00
Justin Van Patten fef3157b18 [codegen/python] Adopt improved key translation (#6696)
This change updates the Python SDK codegen to opt-in to the new casing
translation behavior, which will use the passed-in props type's property
name metadata for translations, rather than calling the resource's
`translate_input_property` and `translate_output_property` methods.

- FIX: Keys in user-defined dicts will no longer be unintentionally
  translated/modified.

- BREAKING: Dictionary keys in nested output classes are now
  consistently snake_case. If accessing camelCase keys from such output
  classes, move to accessing the values via the snake_case property
  getters (or snake_case keys). A warning will be logged when accessing
  camelCase keys.

When serializing inputs:

- If a value is a dict and the associated type is an input type, the
dict's keys will be translated based on the input type's property
name metadata.

- If a value is a dict and the associated type is a dict (or Mapping),
the dict's keys will _not_ be translated.

When resolving outputs:

- If a value is a dict and the associated type is an output type, the
dict's keys will be translated based on the output type's property
name metadata.

- If a value is a dict and the associated type is a dict (or Mapping),
the dict's keys will _not_ be translated.
2021-04-14 19:32:18 +01:00
stack72 e05477b8d6 [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-beta.1 2021-04-14 19:32:18 +01:00
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
Justin Van Patten dcf4359c57
[codegen/python] Support <Resource>Args classes (#6525)
Add support for creating instances of resources in Python using a
`<Resource>Args` class. This capability aligns with how args are passed
to resources in all the other language SDKs and the separate object bag
allows the properties to be manipulated/validated/passed-around before
creating the resource.
2021-04-02 10:09:17 -07:00
Justin Van Patten a9f0aead13
[codegen/go] Fix Go resource registrations (#6641)
We've been emitting calls to `New<Resource>` for resource registrations
in Go, passing `nil` for args. However, some of those `New<Resource>`
functions actually check for `nil` args and return an error if the
resource has required arguments.

At first, I was looking for a way to check inside `New<Resource>` if
the `URN` option was specified and in that case not error on
`nil` args (like we do in other languages), but we don't provide a way
to access the resource option values outside the Go SDK), so I don't
think there is a way to do it this way for Go.

So instead, this change updates the registration code to call
`ctx.RegisterResource` directly instead of `New<Resource>`, where we can
pass a `nil` args.
2021-03-31 16:50:30 -06:00
Vivek Lakshmanan 78c48d5d31 Fix comment/example handling 2021-03-30 22:24:45 -07:00
Vivek Lakshmanan 3151d23f09 Fix to create inputs for nested collections types 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan 700a576b70 Support nested collection types 2021-03-30 22:24:11 -07:00
Paul Stack 1f16423ede
Change nodejs codegen to use coalescing operator when when default values are present (#6496) 2021-03-10 21:16:18 +00:00
Justin Van Patten 572c74826c
Add schema & codegen support for plain properties (#6481)
This change adds schema and codegen support for plain properties which
are emitted typed as the plain type rather than wrapped as an `Input`.
Plain properties require a prompt value and do not accept a value that
is `Output`.
2021-03-10 07:08:08 -08:00
Komal 8616390418
[codegen/python] - Fix python .get() codegen (#6433) 2021-03-01 09:54:25 -08:00
Vivek Lakshmanan 8d022e39e8 Fix tests 2021-02-25 22:26:54 -08:00
Vivek Lakshmanan 92571f8f12 Adding enum container types support for go codegen 2021-02-25 22:26:37 -08:00
Justin Van Patten bdc309bb4a
[codegen/python] Fix issues related to referencing external resources/types (#6328)
- Fix bugs referencing external resources/types
- Fix circular import issue
- Avoid panic when referencing external nested types
2021-02-12 15:54:19 -08:00
Luke Hoban f4b0fa86fe
Don't mutate the opts argument in resource constructors in Node.js (#6321) 2021-02-13 05:10:59 +11:00
Justin Van Patten e86a69bedd
[codegen/nodejs] Emit externally referenced resources/types (#6225) 2021-01-29 16:52:00 -08:00
Vivek Lakshmanan 1452709e97 Fix test 2021-01-29 10:14:24 -08:00
Vivek Lakshmanan 82020af298 Various fixes go codegen to fix SDK compilation problems 2021-01-26 23:16:42 -08:00
Justin Van Patten d7dc6bf404
[codegen/dotnet]: Fix bugs referencing external resources/types (#6182)
- Avoids problematic `using` statements.
- Fixes fully qualified names of external resources.
- Avoids emitting directories with README.md files for external modules.
2021-01-26 11:02:34 -08:00
Vivek Lakshmanan b8e0d53b9b Fix tests for other languages for updated enum test schema 2021-01-22 17:30:44 -08:00
Vivek Lakshmanan fd3bbca5aa Fix default value handling for enums 2021-01-22 17:30:44 -08:00
Vivek Lakshmanan 88d54c0c64 Cleanup 2021-01-21 16:09:08 -08:00
Vivek Lakshmanan f5c76031ae Cleanup test go.mod
Follow up from https://github.com/pulumi/pulumi/pull/6124
2021-01-21 16:00:10 -08:00
Vivek Lakshmanan 4da8a45eb2 Option to generate container types resources now specified in GoPackageInfo 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan 38ac84038c Make resource container-type generation optional 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan 3aa566d286 Fix tests 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan 68b655bba6 Test fixes for other languages due to change in schema. 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan 8f2901df01 Test data to cover types generated for external references 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan 22896074f3 Expand testing to cover all generated files 2021-01-20 11:29:01 -08:00
Levi Blackstone 2dfec71a5c
[codegen/go] Register resource modules/packages (#6121) 2021-01-19 16:59:51 -07:00
Vivek Lakshmanan b70c89eeec Allow optional strict enum types to be omitted
Fixes https://github.com/pulumi/pulumi/issues/6068
2021-01-11 09:58:32 -08:00
Mikhail Shilkov 0f9273fc7b
[codegen] Add support for default values in enum properties (#6017) 2020-12-30 12:46:01 +01:00
Levi Blackstone d3c75afce1
[codegen/go] Fix Input/Output methods for Go resources (#5916) 2020-12-11 11:49:08 -07:00
Mikhail Shilkov cab39dcfa0
[dotnet] Resource package registration in .NET (attributes) (#5875)
* Resource package registration in .NET
* Refactor to attribute-based discovery
* Refactor to derived attributes
2020-12-09 23:28:58 +01:00