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
Revert "Revert "Simplified invokes: SDK-gen and program-gen implementation for dotnet and nodejs"" #11753
Conversation
Changelog[uncommitted] (2023-01-11)Features
|
01dd25d
to
d0813e6
Compare
@Zaid-Ajaj Can you highlight the difference between #11418 and #11753? Are the only changes in |
// indicates a logical bug in our marshaling code. | ||
return nil, diags, fmt.Errorf("error binding outputs for function %v: invalid return type", token) | ||
} | ||
} else if spec.Outputs != 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.
@iwahbe This check here is the main difference. This is the new code block
if spec.ReturnType != nil && spec.Outputs == nil {
// bind from return type
} else if spec.Outputs != nil {
// bind from spec.Outputs
}
whereas before it was only:
if spec.ReturnType != nil {
// bind from return type
}
Which caused the issue that @danielrbradley had where spec.Outputs
was specified by code, not through JSON/YAML parsing and didn't bind correctly.
I've also added a test to show that this actually works: Function.ReturnType
being bound when FunctionSpec.Outputs
is specified.
8317bd8
to
c24fd69
Compare
5e834a9
to
e1f5e0a
Compare
13280a4
to
fe98ef9
Compare
bors merge |
11753: Revert "Revert "Simplified invokes: SDK-gen and program-gen implementation for dotnet and nodejs"" r=Zaid-Ajaj a=Zaid-Ajaj Reverts #11701 and fixes the problem which caused the issue in the first place: - Binding `Outputs` field from `FunctionSpec` into `Function.ReturnType` when available - Adding a test that verifies the above works as expected Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
Build failed: |
fe98ef9
to
caadcfe
Compare
0015f84
to
330676a
Compare
bors merge |
11753: Revert "Revert "Simplified invokes: SDK-gen and program-gen implementation for dotnet and nodejs"" r=Zaid-Ajaj a=Zaid-Ajaj Reverts #11701 and fixes the problem which caused the issue in the first place: - Binding `Outputs` field from `FunctionSpec` into `Function.ReturnType` when available - Adding a test that verifies the above works as expected Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
Build succeeded: |
Reverts #11701 and fixes the problem which caused the issue in the first place:
Outputs
field fromFunctionSpec
intoFunction.ReturnType
when available