Repository navigation
Conversation
Owner
Author
|
Opened upstream as temporalio#267. The branch stays, since that PR uses it, and #56 builds on it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR makes a TypeScript System Nexus operation that returns a resource build the resource from the answer.
The System Nexus branch of the TypeScript operation function returned
result as <Resource>. The answer is the resource's wire message, such asStartWorkflowExecutionResponse, not the resource. Now the branch builds the resource from its bindings, as the endpoint branch does:return new StartedWorkflow(request.namespace, request.workflowId, result.runId ?? undefined).Why?
The cast compiled, but at run time the caller got a plain message with no resource methods and no resource fields. A call to a resource method on it failed.
How did you test it?
tests/generate_typescript.rsgenerates thestart-workflowsample with System Nexus on, and checks thatstartWorkflowbuilds aStartedWorkflow. The test fails on main.cargo test --features advancedpasses.cargo build-examples --lang typescriptgives no diff. Inadvanced/samples/typescript,npm run typecheckandnpm testpass.Came from fork PR #45.