Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet/sdk-gen] Fixes potential conflicts when generating resources called System #14011

Merged
merged 1 commit into from Sep 22, 2023

Conversation

Zaid-Ajaj
Copy link
Contributor

Description

When generating a C# package that has a resource called System, it fails to compile when we fully qualify System.Diagnostics.CodeAnalysis.SuppressMessage in the generated Config.cs file since it thinks that System.Diagnostics is referring to a static class on the System resource definition.

The fix is to prefix the attribute with global:: so that type resolution works as expected.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@Zaid-Ajaj Zaid-Ajaj added language/dotnet area/codegen SDK-gen, program-gen, convert labels Sep 22, 2023
@Zaid-Ajaj Zaid-Ajaj requested a review from a team September 22, 2023 00:56
@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2023-09-22)

Bug Fixes

  • [sdkgen/dotnet] Fixes potential conflicts when generating resources called System
    #14011

@Zaid-Ajaj Zaid-Ajaj added this pull request to the merge queue Sep 22, 2023
Merged via the queue into master with commit a1112c8 Sep 22, 2023
48 checks passed
@Zaid-Ajaj Zaid-Ajaj deleted the zaid/fix-conflicts-with-system-attributes branch September 22, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen SDK-gen, program-gen, convert language/dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants