-
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
[sdk/go] Fix methods panic when marshaling self
#7604
Conversation
func (*Component) ElementType() reflect.Type { | ||
return reflect.TypeOf((*Component)(nil)) | ||
} |
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.
The test fails after adding this (making *Component
implement pulumi.Input
), and succeeds after the fix in context.go
.
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.
Input is such a scary interface. I'm developing an irrational fear that I'm not sure what happens when we declare something an input. I need to work on making this specific :)
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 with a bit of unfortunate FUD about inputs.
Pass a valid `destType` to `marshalInput` to avoid panicing when the `self` resource is an `Input`.
ba96310
to
809c057
Compare
self
self
Pass a valid
destType
tomarshalInput
to avoid panicing when theself
resource implementspulumi.Input
.This issue would have been caught by testing the generated code, in addition to comparing it to what is expected.
Fixes #7603