Mikhail Shilkov
53b48cef2f
Exclude two more names from PyName ( #5285 )
2020-09-03 18:02:21 +02:00
Albert Zhong
69c57f8b47
Add ignorePyNamePanic python flag ( #5268 )
2020-09-02 16:25:19 -07:00
Justin Van Patten
d583bcb915
[codegen/nodejs] Remove unnecessary ctor overload ( #5274 )
...
An extra constructor overload was recently added to pass undefined state from
`get` for resources that do not have any state inputs (notably Kubernetes
resources). This ended up breaking PaC's `validateResourceOfType`, which relies
on type inference in common usage to determine the resource's args type based
on the signature of the constructor.
This constructor overload isn't necessary. Instead, we can remove it and modify
how the constructor is called inside `get`. This also makes it so we're not
exposing details about `get`'s implementation in the public API.
2020-09-02 09:09:41 -06:00
Levi Blackstone
5ec0b985d4
[codegen/nodejs] Fix omitted output properties in constructor ( #5273 )
...
Changed the codegen in 6fd72dc0
but missed a condition that
is causing incorrect code in pulumi-kubernetes. This change
correctly generates inputs in both conditional branches.
2020-09-01 17:56:38 -06:00
Levi Blackstone
6fd72dc0db
[codegen/nodejs] Fix constructors to populate inputs on get ( #5272 )
2020-09-01 16:37:03 -06:00
Mikhail Shilkov
81992485dd
Full name for aliases in .NET codegen ( #5245 )
2020-08-28 18:57:57 +02:00
Justin Van Patten
7eb99fe7bb
[codegen/python] Emit properties named "property" last ( #5247 )
...
This avoids conflicting with the built-in `@property` decorator function for other properties.
2020-08-28 08:55:02 -07:00
Komal
5caa5616f7
[codegen/nodejs] - Fix whitespace in genNamespace code ( #5240 )
2020-08-27 14:50:34 -07:00
Justin Van Patten
910aa96016
[codegen/python] Add type annotation to resource_name arg ( #5217 )
2020-08-25 12:07:08 -07:00
Justin Van Patten
502685ed0e
[codegen/python] Fix resource outputs type annotations ( #5221 )
...
These should be typed as `Output[T]`.
2020-08-25 11:07:22 -07:00
Mikhail Shilkov
4c42e5e850
Relax submodule generation for Node and Python ( #5204 )
2020-08-23 00:00:21 +02:00
Praneet Loke
072aac2c79
[codegen/docs] Lower-case the module name for Go. ( #5207 )
2020-08-21 15:34:57 -07:00
Mikhail Shilkov
b9b3c836bc
Exclude more names from Python name validation ( #5205 )
2020-08-21 20:41:33 +02:00
Justin Van Patten
6292543342
[codegen/python] Fix unintended name changes from PyName and some whitespace cleanup ( #5202 )
...
If PyName(name) != PyNameLegacy(name), we panic, unless name is in an exclusion list.
Once all providers have been updated to this codegen (and we've added to `useLegacyName` and `excludeFromPanic` as appropriate), we can go back and remove the panic behavior along with the `excludeFromPanic` behavior.
2020-08-20 20:51:32 -07:00
Justin Van Patten
ca7536e17f
[codgen/python] Always consider the config subpackage non-empty ( #5195 )
...
If there's a config subpackage, we had explicitly added it to the map of modules because there *are* config properties, so we know it will be non-empty. This change ensures the config subpackage is imported in the top-level package's __init__.py and that the config subpackage itself has an __init__.py emitted.
2020-08-20 11:07:09 -07:00
Evan Boyle
0f98bac105
fix unchecked type assertion ( #5194 )
2020-08-19 13:58:13 -07:00
Praneet Loke
e3b436211d
[codegen/docs] Link to Pulumi.Input-1.html when generating the doc link for the Pulumi.Input type. ( #5187 )
2020-08-19 11:21:54 -07:00
Justin Van Patten
92c0d1dc30
Docgen changes for Python input/output types ( #5137 )
...
Resource doc changes for Python:
- Types are included in constructor/function args
- The property names for input/output types are now always snake_case, regardless of the generated mapping tables, to match the new input/output classes
- Some other minor tweaks to function/constructor signatures (e.g. removed the `__props__` arg, as it's not meant to be used directly; use `@staticmethod` for static `get` methods).
2020-08-19 08:34:06 -07:00
Mikhail Shilkov
6cc7b3c107
Docs for versioned modules ( #5183 )
2020-08-19 14:57:39 +02:00
Justin Van Patten
78edb28590
Add Python input/output classes to provider codegen ( #5034 )
...
This updates the Python codegen to emit input/output classes.
2020-08-19 01:16:47 -07:00
Vivek Lakshmanan
8777dd77ca
Merge pull request #5170 from pulumi/vl/ResourceOptions
...
Map python resource options to provider options
2020-08-17 17:36:05 -07:00
Vivek Lakshmanan
f6fd98544d
Update pkg/codegen/python/gen.go
...
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-08-17 16:58:59 -07:00
Komal
d7ce0e586c
[codegen/python] - Include single word props in casing tables. ( #5181 )
2020-08-17 16:44:55 -07:00
Vivek Lakshmanan
38387f1742
Set the snake case translation for provider input properties
...
Fixes https://github.com/pulumi/pulumi-kubernetes/issues/1244
2020-08-14 14:34:46 -07:00
Praneet Loke
99fcd359ee
[codegen/docs] Fix the case used in links for Node.js modules. ( #5165 )
2020-08-13 17:29:56 -07:00
Evan Boyle
c9d8549ae6
[Go Program Gen] Only generate a single literal when traversing a union type ( #5154 )
2020-08-11 11:43:56 -07:00
Albert Zhong
2cd0c000bd
[codegen] Add codegen/go/gen_crd2pulumi, clean up codegen/nodejs/gen_crd2pulumi ( #5116 )
...
* Add codegen/go/gen_crd2pulumi
* Properly generate Go CRD resources
* generate nodejs resources
* Remove nodejs/gen_crd2pulumi.go
* Remove generating funtions
2020-08-10 10:21:50 -07:00
Komal
2f2e62e2e4
[codegen/python] - Normalize module names in program gen ( #5128 )
2020-08-07 09:30:07 -07:00
Mikhail Shilkov
0c9d1fdd0e
Fix C# program gen for Kubernetes examples ( #5129 )
2020-08-07 09:31:42 -06:00
Pat Gavlin
e5f44a7b0c
Use a package map where appropriate ( #5127 )
...
* Use a package map where appropriate
* Fix imports
* handle NoneType for literal value expressions in go program gen
* add operator tests for c#, python, and node
Co-authored-by: evanboyle <evan@pulumi.com>
2020-08-06 19:09:18 -07:00
Komal
ff219a2381
Use input/output classes in program gen ( #5086 )
2020-08-06 15:09:23 -07:00
Levi Blackstone
ba18683d9a
[codegen] Generate null values for model.NoneType ( #5122 )
2020-08-06 14:12:27 -06:00
Evan Boyle
fbf391fd4b
Merge pull request #5115 from pulumi/evan/fixKubeProgramGen
...
[Go Program Gen] Fix various Kubernetes issues
2020-08-05 17:30:23 -07:00
Levi Blackstone
3286aae20d
[codegen] Make schema and package available to HCL2 codegen ( #5114 )
2020-08-05 17:27:17 -06:00
Pat Gavlin
63db7e0d46
Use the existing contexts map.
2020-08-05 16:11:12 -07:00
evanboyle
9425016521
add todos
2020-08-05 15:50:07 -07:00
evanboyle
2c350b08d8
lint
2020-08-05 15:31:12 -07:00
evanboyle
2f71fbbf2d
traverse object and tuple cons expressions for imports
2020-08-05 15:23:36 -07:00
Komal
269b537e57
[codegen/python] - Fix python resource tokens ( #5107 )
2020-08-05 12:50:54 -07:00
evanboyle
8af3be1e3f
account for import aliases in program expressions
2020-08-05 12:44:46 -07:00
evanboyle
e2e6db47f7
use import aliases in Go program gen
2020-08-05 11:42:38 -07:00
Komal
d2dd990866
[codegen/python] Fix pyname bug ( #4918 )
2020-08-05 10:08:52 -07:00
Evan Boyle
13ee9fd4c8
tests for kubernetes program generation ( #5105 )
2020-08-05 09:15:36 -07:00
Albert Zhong
06fa515bf7
[codegen/nodejs] Refactor genNamespace, add crd2pulumi ( #5084 )
...
* Refractor genNamespace, add crd2pulumi
* Rename to genCRDNamespaces()
* Rename crd2pulumi genCRDNamespaces function
2020-07-31 18:29:00 -07:00
Mikhail Shilkov
044bb6bb61
Match module versions also outside the kubernetes compat flag ( #5088 )
2020-07-31 21:50:34 +02:00
Mikhail Shilkov
526e5264b8
Handle resource_name properties to avoid conflicts in Python codegen ( #5052 )
2020-07-30 16:29:36 +02:00
Lee Briggs
c9fedef887
Merge pull request #4947 from pulumi/jaxxstorm/provider-info
...
add plugin download url metadata to package spec
2020-07-21 12:03:09 -07:00
Sean Fausett
a38bbaa221
Enable SourceLink with embedded PDB ( #4967 )
2020-07-21 16:55:08 +02:00
Lee Briggs
3b0462f0e0
Merge branch 'master' into jaxxstorm/provider-info
2020-07-20 17:35:47 -07:00
Gabriel Diaz
ffb8c2400d
Fix semicolon in python docs ( #5025 )
2020-07-17 21:16:30 -07:00