Commit Graph

15 Commits

Author SHA1 Message Date
Aaron Friel a4b1d6b2a7 ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
Mikhail Shilkov d55f2288b0
Remove deprecated PyNameLegacy () 2022-06-15 14:45:55 +02:00
Ian Wahbe 9215392483
Fix TS name generation for names that start with `_` ()
* Add test case

* Correctly import plain types

* Update tests

* Update type_driver tests

* Update CHANGELOG_PENDING.md

* Fix TS enum names

* Extend simple-enum-schema test to cover edge case

* Small code cleanup
2022-05-02 11:16:21 -07:00
Pat Gavlin 28b1a25629
[codegen/python] Improve program gen perf. ()
- 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
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 5164725cb5
[codegen/python] Remove panic from PyName ()
The codegen updates have been run against all providers, so there's no longer a need to keep the panic.
2020-09-14 08:42:01 -07:00
Mikhail Shilkov 53b48cef2f
Exclude two more names from PyName () 2020-09-03 18:02:21 +02:00
Albert Zhong 69c57f8b47
Add ignorePyNamePanic python flag () 2020-09-02 16:25:19 -07:00
Mikhail Shilkov b9b3c836bc
Exclude more names from Python name validation () 2020-08-21 20:41:33 +02:00
Justin Van Patten 6292543342
[codegen/python] Fix unintended name changes from PyName and some whitespace cleanup ()
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
Komal d2dd990866
[codegen/python] Fix pyname bug () 2020-08-05 10:08:52 -07:00
Pat Gavlin 72a6add300
[codegen/python] Decrease alloc volume in PyName. ()
Use strings.Builder instead of raw slices. We could go further here and
collapse to a single, ~right-sized bulder at the cost of complexity in
the `stateAcronym -> stateLowerOrNumber` transition.

Also, eliminate the pyName function, as it is redundant.
2020-04-30 13:22:13 -07:00
Pat Gavlin af344d9b72
Fix Python module names. ()
In particular, ensure that they are keyword-safe. This affects
`aws:lambda:*` in particular: prior to these changes, we were generating
code into `pulumi_aws.lamdba`, which is not referencable due to its use
of the `lamdba` keyword. With these changes, we generate code into
`pulumi_aws.lambda_`.

There is also a small fix for multi-line non-formatted strings: these
strings do not need escaped braces.
2020-04-24 08:52:36 -07:00
Pat Gavlin 1f19cbbe08
Clean up the language-specific schema APIs. ()
Rather than forcing consumers to deal with language-specific data
ad-hoc, add an API that allows all language-specific data to be decoded
up-front.
2020-04-20 16:36:05 -07:00
Paul Stack 67194cddfd
Creation of generator package ()
Fixes: 

This will allow us to be able to share the code that generates our
language providers. Currently there is a copy of the python code
generation in pulumi-kubernetes and also in pulumi-terraform

We want to be able to share these
2019-07-22 17:09:35 -07:00