Repository navigation
Conversation
…ult-record-holds-resource # Conflicts: # src/generator/typescript.rs
* Skipped docstrings when Python picks the names to import. * Reworded the changelog line for the docstring import fix.
…lio#268) * Made Python resource methods valid for any WIT parameter order. * Took undefined for optional TS params before a required one. * Showed the keyword-only resource method in the user-service sample. * Dropped the TypeScript unit test that the user-service golden replaces.
# Conflicts: # advanced/samples/inputs/examples.toml
# Conflicts: # advanced/samples/inputs/examples.toml # src/generator/dotnet.rs # src/generator/python.rs # src/planning/mod.rs
# Conflicts: # advanced/samples/inputs/examples.toml # src/generator/python.rs
# Conflicts: # advanced/samples/inputs/examples.toml
# Conflicts: # advanced/samples/dotnet/wit/stream-service/Models.cs # advanced/samples/dotnet/wit/stream-service/Operations.cs # advanced/samples/dotnet/wit/stream-service/Services.cs # advanced/samples/inputs/examples.toml # src/generator/dotnet.rs # src/planning/mod.rs
# Conflicts: # advanced/samples/inputs/examples.toml
# Conflicts: # advanced/samples/README.md # advanced/samples/dotnet/Nexgen.DotNetExamples.csproj # src/generator/typescript.rs
# Conflicts: # advanced/samples/inputs/examples.toml
Owner
Author
|
Closed as NOT-STREAM. Streaming resources are proto-backed, and the caller already handles a proto wire type. |
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 lets the Python
--clientcaller call an operation that returns a WIT-only resource, or a record that holds one. The caller decodes the JSON answer into the class from_resources.Why?
The caller refused any operation that returns a resource without a proto wire type, so a WIT-only service with a create got no caller.
How did you test it?
The
stream-servicesample turns onclient = true, and itsclient.pygolden showscreate_streamreturningCreateStreamResult. A sample test decodes an answer over a fake transport and checks thatresult.streamis aStream.This PR is based on fork PR #54, and it merges fork PR #56 for the
stream-servicesample.