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

go program gen: prompt array conversion, unused range vars, id handling #4884

Merged
merged 3 commits into from
Jun 24, 2020

Conversation

EvanBoyle
Copy link
Contributor

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.

@github-actions
Copy link

Diff for pulumi-random with merge commit 03716ee

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 03716ee

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 03716ee

@github-actions
Copy link

Diff for pulumi-random with merge commit 302f33b

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 03716ee

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 302f33b

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 302f33b

@github-actions
Copy link

Diff for pulumi-azure with merge commit 03716ee

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 302f33b

@github-actions
Copy link

Diff for pulumi-aws with merge commit 03716ee

@github-actions
Copy link

Diff for pulumi-aws with merge commit 302f33b

@github-actions
Copy link

Diff for pulumi-azure with merge commit 302f33b

Copy link
Member

@lblackstone lblackstone left a 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

pkg/codegen/go/gen_program_utils.go Outdated Show resolved Hide resolved
pkg/codegen/go/gen_program_utils.go Outdated Show resolved Hide resolved
pkg/codegen/go/gen_program.go Outdated Show resolved Hide resolved
@github-actions
Copy link

Diff for pulumi-azuread with merge commit 13b30a9

@github-actions
Copy link

Diff for pulumi-random with merge commit 13b30a9

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 13b30a9

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 13b30a9

@github-actions
Copy link

Diff for pulumi-aws with merge commit 13b30a9

@github-actions
Copy link

Diff for pulumi-azure with merge commit 13b30a9

@EvanBoyle EvanBoyle merged commit 31770c3 into master Jun 24, 2020
@pulumi-bot pulumi-bot deleted the evan/goProgramGenPolish branch June 24, 2020 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants