-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
go program gen: prompt array conversion, unused range vars, id handling #4884
Conversation
Diff for pulumi-random with merge commit 03716ee |
Diff for pulumi-azuread with merge commit 03716ee |
Diff for pulumi-kubernetes with merge commit 03716ee |
Diff for pulumi-random with merge commit 302f33b |
Diff for pulumi-gcp with merge commit 03716ee |
Diff for pulumi-kubernetes with merge commit 302f33b |
Diff for pulumi-azuread with merge commit 302f33b |
Diff for pulumi-azure with merge commit 03716ee |
Diff for pulumi-gcp with merge commit 302f33b |
Diff for pulumi-aws with merge commit 03716ee |
Diff for pulumi-aws with merge commit 302f33b |
Diff for pulumi-azure with merge commit 302f33b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall; just a few simplifications
Diff for pulumi-azuread with merge commit 13b30a9 |
Diff for pulumi-random with merge commit 13b30a9 |
Diff for pulumi-kubernetes with merge commit 13b30a9 |
Diff for pulumi-gcp with merge commit 13b30a9 |
Diff for pulumi-aws with merge commit 13b30a9 |
Diff for pulumi-azure with merge commit 13b30a9 |
This closes out the last of the known issues causing compilation errors in examples. (deeper quality pass over the providers is still pending: #4783)
Fixes: #4833, #4852, and #4769
The ID issue turned out to be bad typing on the destination array (easy fix), the unused range vars was a simple static change, so the prompt array conversion is the meat here.
Rather than doing a complicated lowering step ahead of time, I just wrap the scope traversal expressions in a helper function call as suggested by @lblackstone for something similar in a previous review. In this case, the resulting code is substantially simpler to generate as we're already detecting the proper situation at generate time from within scope traversal expressions.