Repository navigation
Conversation
moetemp
marked this pull request as draft
October 27, 2026 07:47
A stream has no identity without its ref, so each request takes it as a required field. The required fields come first, so the generated Python dataclasses need no kw_only when lists become required.
moetemp
force-pushed
the
moe/up/stream-ref-required
branch
from
October 27, 2026 16:34
f92d0c0 to
cf4d780
Compare
Contributor
Author
|
Closing this. #308 swaps the stream samples for Brook's real Stream service and writer WIT, which already make each request's |
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 the stream ref required on each request of the
stream-servicesample, and lists each request's required fields first.create-stream-request.ref, and%streamon the append, close, read and describe requests, are required. The generatedcreate_streamtakesrefas a required argument in Python, TypeScript and .NET.recordsandtopicscome right after the stream. Once lists are required (Fix authored WIT collection optionality #300), the Python request dataclasses still need nokw_only.Why?
A stream has no identity without its ref, so a create with no
refmakes no sense. It came up in the review of the client target, and Tim suggested the field order on #300.Flattening the ref into
create_stream, so the caller passesiddirectly, is a separate question.@nexus.flatten-in-apidoesn't work with resources in TypeScript and .NET yet.How did you test it?
cargo validatepasses.