mirror of https://github.com/pulumi/pulumi.git
f8236e125e
Currently, when generating docs for the AWSX package, Go constructor syntax examples were not generated due to a panic. This causes all constructor examples to not be emitted in the docs. The panic occurred when trying to get the version of referenced packages in the PCL program to emit import paths. However, _transitive_ package references were not resolved in the PCL binder when binding resource types. This PR fixes the problem such that now we do find the transitive package references from any input or output property of the resources being bound. In the case of the awsx package, the top-level package is awsx itself and aws is the transitive dependency. Anytime in codegen we call `program.PackageReferences()` we should get both of them. Added a unit test for this as well. Testing this fix locally against the awsx package showed constructor examples being generated for every language, however there was still a problem in the _formatting_ of Go code which is also fixed (see change in `gen_program_expressions.go`) Resolves part of #16463 |
||
---|---|---|
.. | ||
aws-static-website.cs |