Repository navigation
Conversation
A required method parameter after an optional one makes the method keyword-only, lists default to empty, enum parameters import their proto module, and a required resource field from the response is checked.
The caller gets iter_<operation>, and a bound resource method gets iter_<method>. No wire type changes, since a WIT stream cannot cross a Nexus call.
The resource binds from the record's message, the other fields come from the same message, and the message travels as a wire record named after it.
The caller takes a data_converter, and the payloads and failures inside a proto-backed model go through its converters and codec, as in Workflow code.
A client-only service gets its caller and resource classes in client.py and no Workflow surface, for an in-process call surface such as the Stream writer.
A result record that holds a resource declares only what its caller sees, and the planned holder keeps its fields in order, for the other targets.
TypeScript, .NET and Go no longer refuse such a record. Java still does.
…ream-resource # Conflicts: # GUIDE.md
…n8-stream-resource
# Conflicts: # tests/generate_typescript.rs # xtask/src/build_examples.rs
# Conflicts: # tests/generate_python.rs
# Conflicts: # advanced/samples/dotnet/wit/user-service/Models.cs # advanced/samples/dotnet/wit/user-service/Resources.cs # advanced/samples/dotnet/wit/user-service/Services.cs # advanced/samples/go/userservice/userservice.go # advanced/samples/inputs/user-service.wit # advanced/samples/python/tests/test_user_service.py # advanced/samples/python/wit/user_service/__init__.py # advanced/samples/python/wit/user_service/_resources/user.py # advanced/samples/python/wit/user_service/models.py # advanced/samples/python/wit/user_service/services.py # advanced/samples/typescript/tests/user-service.test.ts # advanced/samples/typescript/wit/user-service/index.ts # advanced/samples/typescript/wit/user-service/models.ts # advanced/samples/typescript/wit/user-service/resources.ts # advanced/samples/typescript/wit/user-service/services.ts # src/generator/python.rs # tests/generate_python.rs
# Conflicts: # advanced/samples/inputs/examples.toml
# Conflicts: # advanced/samples/README.md # advanced/samples/inputs/examples.toml # xtask/src/build_examples.rs
# Conflicts: # advanced/samples/inputs/user-service.wit
Owner
Author
|
Closed in favor of the review chain. Its two remaining parts are #57 (the client resource docstrings) and #74 ( |
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 fits nexgen's resources to the Brook
StreamandWriterhandles. It merges the upstream PRs #48 to #53, #56 and #57. Fork-only:@nexus.client-only, for the Brook writer's in-process call surface.iter_<method>on a Workflow resource for a long poll over offsets.@nexus.docon the client resource classes.Why?
Decisions S84 to S87: the Stream and Writer handles come from the IDL, reads are an iterator, handles are immutable values, and the writer is a client-only WIT interface.
How did you test it?
tests/wit_streaming.rschecks the Workflow resource iterator and a client-only service.