pulumi
pulumi copied to clipboard
[codegen/dotnet] Honor C# language name overrides for constructor params of output types
Description
NOTE: This PR picks up from a previous PR https://github.com/pulumi/pulumi/pull/14246 now that pulumi/pulumi-dotnet#231 is merged.
This PR updates the dotnet
codegen to emit OutputConstructorParameterAttribute
attribute for constructor parameters that have a C#-specific language override defined in the provider's Pulumi schema.
Fixes #14130
Checklist
- [x] I have run
make tidy
to update any new dependencies - [x] I have run
make lint
to verify my code passes the lint check- [x] I have formatted my code using
gofumpt
- [x] I have formatted my code using
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have run
make changelog
and committed thechangelog/pending/<file>
documenting my change
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version
PR is now waiting for a maintainer to take action.
Note for the maintainer: Commands available:
-
/run-acceptance-tests
- used to test run the acceptance tests for the project -
/run-codegen
- used to test the Pull Request against downstream codegen -
/run-docs-gen
- used to test the Pull Request against documentation generation
Changelog
[uncommitted] (2024-04-27)
Bug Fixes
- [sdkgen/dotnet] Output type constructor parameters respect property name overrides
PR is now waiting for a maintainer to take action.
Note for the maintainer: Commands available:
-
/run-acceptance-tests
- used to test run the acceptance tests for the project -
/run-codegen
- used to test the Pull Request against downstream codegen -
/run-docs-gen
- used to test the Pull Request against documentation generation
PR is now waiting for a maintainer to take action.
Note for the maintainer: Commands available:
-
/run-acceptance-tests
- used to test run the acceptance tests for the project -
/run-codegen
- used to test the Pull Request against downstream codegen -
/run-docs-gen
- used to test the Pull Request against documentation generation
@praneetloke Are you planning to finish this PR, or should we close it? (I'm just doing some housekeeping here)
@mikhailshilkov this PR is blocked by a pending release of pulumi-dotnet
that includes the newly added attribute for constructor params of output types.
@mikhailshilkov I've marked this as ready for review. pulumi-dotnet's 3.61.0
contains the C# attribute this PR uses in the codegen. My understanding is that the project reference emitted by the codegen automatically picks up the newest minor version as per https://github.com/pulumi/pulumi/blob/master/pkg/codegen/dotnet/gen.go#L2263. Let me know if that's not true?
PR is now waiting for a maintainer to take action.
Note for the maintainer: Commands available:
-
/run-acceptance-tests
- used to test run the acceptance tests for the project -
/run-codegen
- used to test the Pull Request against downstream codegen -
/run-docs-gen
- used to test the Pull Request against documentation generation
PR is now waiting for a maintainer to take action.
Note for the maintainer: Commands available:
-
/run-acceptance-tests
- used to test run the acceptance tests for the project -
/run-codegen
- used to test the Pull Request against downstream codegen -
/run-docs-gen
- used to test the Pull Request against documentation generation
/run-acceptance-tests Please view the results of the acceptance tests Here
/home/runner/work/pulumi/pulumi/tests/testdata/codegen/regress-dotnet-14130/dotnet/Outputs/ExampleType.cs(24,14): error CS0246: The type or namespace name 'OutputConstructorParameterAttribute' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/pulumi/pulumi/tests/testdata/codegen/regress-dotnet-14130/dotnet/Pulumi.Example.csproj]
Tests aren't happy. I think the nuget dependency constraint needs updating.
PR is now waiting for a maintainer to take action.
Note for the maintainer: Commands available:
-
/run-acceptance-tests
- used to test run the acceptance tests for the project -
/run-codegen
- used to test the Pull Request against downstream codegen -
/run-docs-gen
- used to test the Pull Request against documentation generation
👋 I just noticed that this is still open. I am not sure if it's needed anymore though.