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

Do not generate Go inputty types for output-only schema types #7943

Merged
merged 17 commits into from Dec 10, 2021

Conversation

mikhailshilkov
Copy link
Member

@mikhailshilkov mikhailshilkov commented Sep 10, 2021

These changes prevent the Go SDK generator from generating input
types that are never referenced by rest of the generated SDK. For
example, if an object type never appears in a resource input property,
these changes will prevent an input type from being generated for
that object type. In further pursuit of this goal, these changes prevent
the generation of input/output types for function inputs and arguments
if function output versions are disabled or if the function does not need
an output form.

In order to preserve backwards compatibility, the extra input types can
be retained by setting the generateExtraInputTypes property in the
Go language options for a Pulumi package.

The goal of these changes is to reduce the size of Go SDK, particularly
for Azure-Native.

Fixes: #8194

@github-actions
Copy link

Diff for pulumi-random with merge commit ea68bf9

@github-actions
Copy link

Diff for pulumi-azuread with merge commit ea68bf9

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit ea68bf9

@github-actions
Copy link

Diff for pulumi-aws with merge commit ea68bf9

@github-actions
Copy link

Diff for pulumi-gcp with merge commit ea68bf9

@github-actions
Copy link

Diff for pulumi-azure with merge commit ea68bf9

@emiliza emiliza modified the milestone: 0.62 Sep 13, 2021
@emiliza emiliza modified the milestones: 0.62, 0.63 Oct 1, 2021
@emiliza emiliza requested a review from pgavlin October 4, 2021 16:20
@emiliza emiliza modified the milestones: 0.63, 0.64 Oct 25, 2021
@pgavlin pgavlin force-pushed the mikhailshilkov/reduce-go-input-types branch from b226d9e to c818919 Compare November 2, 2021 15:56
@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azuread with merge commit 9ec1554

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-random with merge commit 9ec1554

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-kubernetes with merge commit 9ec1554

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-gcp with merge commit 9ec1554

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-azure with merge commit 9ec1554

@github-actions
Copy link

github-actions bot commented Nov 2, 2021

Diff for pulumi-aws with merge commit 9ec1554

pgavlin added a commit that referenced this pull request Nov 2, 2021
- Remove enumElementType, whose functionality duplicates work done in
  argsTypeImpl
- Clarify the args- vs. Go-ness of the two element types

This is prep work for #7943.
pgavlin added a commit that referenced this pull request Nov 3, 2021
- Remove enumElementType, whose functionality duplicates work done in
  argsTypeImpl
- Clarify the args- vs. Go-ness of the two element types

This is prep work for #7943. These changes should not produce codegen diffs.
@pgavlin pgavlin force-pushed the mikhailshilkov/reduce-go-input-types branch from bedb11c to 4de357f Compare November 4, 2021 15:18
@github-actions
Copy link

github-actions bot commented Nov 4, 2021

Diff for pulumi-random with merge commit ff7782b

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

Diff for pulumi-azuread with merge commit ff7782b

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

Diff for pulumi-kubernetes with merge commit ff7782b

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

Diff for pulumi-gcp with merge commit ff7782b

@pgavlin pgavlin force-pushed the mikhailshilkov/reduce-go-input-types branch from de51d2e to 92bdc83 Compare December 10, 2021 21:42
@github-actions
Copy link

Diff for pulumi-azuread with merge commit dff3b94

@github-actions
Copy link

Diff for pulumi-random with merge commit dff3b94

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit dff3b94

@github-actions
Copy link

Diff for pulumi-gcp with merge commit dff3b94

@github-actions
Copy link

Diff for pulumi-azure with merge commit dff3b94

@github-actions
Copy link

Diff for pulumi-aws with merge commit dff3b94

@t0yv0
Copy link
Member

t0yv0 commented Dec 10, 2021

Yeah we need this change asap, I'm in favor. LMK if need another review or dig in on some specifics.

@github-actions
Copy link

Diff for pulumi-azure-native with merge commit dff3b94

@iwahbe iwahbe self-requested a review December 10, 2021 22:57
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except my previous items, I think this looks good. Like @t0yv0, I'm relying heavily on downstream tests to supplement correctness checks. I think that the change would result in compile time errors more than runtime errors, so downstream is a powerful check here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not generate Go inputty types for output-only schema types
5 participants