* Rebase 5758 .NET work and make output-funcs pass
* Propagate changes to the other examples
* CHANGELOG
* Address PR feedback
* Add a test reproducing aws-native compilation failure
* Fix dangling type ref issue in the .NET backend for codegen
* Accept changes and unskip simple-methods-schema compile check
* Accept changes in node, python, go codegen
* SDK changes to enable a better implementation approach
* Switch approach to support functions like GetAmiIds; avoid name conflicts under tfbridge20
* Make all dotnet tests pass, mechanical fixes + accept test output
* Accept python changes
* Accept node output
* Accept docs changes
* Deepen the unit test to cover the interesting helper type
* Accept go changes and fixup tests
* Implement dep propagation through Invoke
* Fixup cyclic-types
* Accept codegen
* NOTE we now require .NET SDK 3.15 or higher
* Update generation templates
* Updated templates for codegen
* Rm api-doc-resource template
* Update templates to use layout:api and no alias
* Set no_edit_this_page to true in the header and index templates used by docs gen.
* Update docs generation baseline test files with template updates
* Remove the notion of menu from resource templates (#8200)
* Update the title lookup map entry for aws-api-gateway
* Updated CSS classes for icons in API docs template
* Updated tests:
* Additional test file updates
* Fixup package names
Co-authored-by: Devon Grove <devon@pulumi.com>
Co-authored-by: Christian Nunciato <c@nunciato.org>
Co-authored-by: stack72 <public@paulstack.co.uk>
Register an appropriate input type with the runtime for each object
type and composite thereof (e.g. pointer, array, etc.). This does not
cover registrations for enum and resource input types, which will be
added with future changes.
Co-authored-by: Pat Gavlin <pat@pulumi.com>
* Do not share maps so tests can run in parallel
* Fix comment
* Try not to break dependencies
* Address PR feedback
* Fix downstream compilation failure
* Fix lint
* Address PR feedback
* Add a test demonstrating the problem
* Fix the bug
* Accept changes over the example set
* Accept go changes
* Accept python codegen; avoid nil lang info panic
* Accept .NET changes, compile
* Accept docs changes
* Add changelog notes
* Fix lint
* Add parens sparingly
* Flatten unions
* PR feedback
* Move program tests into folders
* update package schema
* Enabled tests pass
* Fix lints and begin to update test cases
* Re-enable tests
* Update aws version to v4
* Refactor language specific parts
* Hook up dotnet and nodejs
* Update tests from master
* SSOT for schema/version
* Name blocking errors. Leave tests in valid state
* Give each language its own folder
* Remove SkipCompile for azure-sa (bug was fixed)
* Fix nits + changes asserts to require
* Remove unused import
* One last assert => require
When computing the type name for a field of an object type, we must
ensure that we do not generate invalid recursive struct types. A struct
type T contains invalid recursion if the closure of its fields and its
struct-typed fields' fields includes a field of type T. A few examples:
Directly invalid:
type T struct { Invalid T }
Indirectly invalid:
type T struct { Invalid S }
type S struct { Invalid T }
In order to avoid generating invalid struct types, we replace all
references to types involved in a cyclical definition with *T. The
examples above therefore become:
(1) type T struct { Valid *T }
(2) type T struct { Valid *S }
type S struct { Valid *T }
We do this using a rewriter that turns all fields involved in reference
cycles into optional fields.
These changes also include an enhancement to the SDK codegen test
driver in the interest of making iterating and debugging more convenient: if the -sdk.no-checks flag is passed, the driver will not run post-generation checks.
* Multi-pass, in-place checks for SDK codegen tests; toward working Python checks
* Remove temp debug output
* Upgrade Node
* Update dotnet; need to follow up on version.txt quirks
* WIP
* Sounds like we can use non-github package names to ensure things are local
* Fix simple-enum-schema
* Fix dash-named-schema
* Fix nested-module
* Start building a test-running pass
* Infer skipping tests from skipping compiles
* Move tree schma tests to a proper place
* Address lint issues on Go code
* Build against local Go SDK
* Update pkg/codegen/internal/test/sdk_driver.go
Co-authored-by: Ian Wahbe <ian@wahbe.com>
* Make go tests work by copying them into the tree from go-extras
* Fix lint
* Fix bad merge
* Manifest-based file discovery
* Remove version-related TODO from dotnet codegen
* Add doc comment
* Do not overwrite go.mod if found from mixins
* Accept python codegen change
* Accept node codegen
* Ignore lint issue
* Accept docs changes
Co-authored-by: Ian Wahbe <ian@wahbe.com>
The Pulumi Package metaschema is a JSON schema definition that describes
the format of a Pulumi Package schema. The metaschema can be used to
validate certain basic properties of a Pulumi Package schema, including
(but not limited to):
- data types (e.g. is this property a string?)
- data formats (e.g. is this string property a valid regex?)
- object shapes (e.g. is this object missing required properties?)
The schema binder has been updated to use the metaschema as its first
validation pass.
In addition to its use in the binder, the metaschema has its own page in
the developer documentation. This page is generated using a small tool,
jsonschema2md.go.
* Add pascal name case
* Add test to prevent regressions
* Update CHANGELOG_PENDING.md
* Give node/tsc more memory
* Use camelcase instead of snake case
* Add clearer comments
* Emit schema.Package.Version when possible
* Update CHANGELOG_PENDING.md
* Correctly interpret python versions (I hope)
* Update PLUGIN_VERSION to the package version
* Modify tests to conform with master merge
* Validate Name, Version and Enviroment
For the full path:
Package.Name
Package.Version
Package.Property.Default
* Update tests
* Update CHANGELOG_PENDING.md
* Add more versions to tests
* Add another "Version" field
* Even more "version" tags
* One more "version" tag added
* Update test results from codegen
* Fix py codegen tests
* Fix doc test
* Remove `version` validation
* Unformat json files
* Fail only on errors
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
* 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.
* 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
* 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
* 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
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.
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.