Repository navigation
Conversation
This was referenced Oct 28, 2026
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
October 29, 2026 04:00
bb29c8a to
56d99e2
Compare
moetemp
force-pushed
the
moe/up/resource-factory
branch
2 times, most recently
from
October 31, 2026 13:08
3e97846 to
ff120ff
Compare
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
October 31, 2026 13:08
56d99e2 to
e082b61
Compare
moetemp
force-pushed
the
moe/up/resource-factory
branch
from
November 3, 2026 15:22
ff120ff to
c0e998f
Compare
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
2 times, most recently
from
November 4, 2026 09:34
9d48475 to
00292fd
Compare
moetemp
force-pushed
the
moe/up/resource-factory
branch
from
November 4, 2026 09:34
c0e998f to
242c137
Compare
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
November 5, 2026 05:19
00292fd to
e3ee76c
Compare
moetemp
force-pushed
the
moe/up/resource-factory
branch
from
November 5, 2026 07:27
801829b to
de23557
Compare
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
November 5, 2026 07:27
e3ee76c to
08c1907
Compare
A resource method can take the items of its last list as arguments, take a one-field record as its field, and return one field of the response. The Stream's publish takes values and returns the last offset.
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
November 5, 2026 22:22
08c1907 to
6b54092
Compare
Owner
Author
|
Replaced by temporalio#372. |
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 adds
@nexus.varargs,@nexus.unwrapand@nexus.result-field. Together they make the Stream'spublish(records) -> append-records-responseintopublish(*values) -> int.@nexus.unwrapon a record with one field makes a resource method take that field's type, and wrap each value. The model and the wire keep the record.@nexus.varargsmakes the last list parameter of a resource method variadic.@nexus.result-fieldmakes a resource method return one field of the response. An unsetoptionfield of a proto with no presence gives its zero value, so an emptypublishreturns0.Python generates all three, and TypeScript and .NET get them with their client targets in follow-up PRs. Go refuses them.
Why?
The proposal has
publish(*values: T) -> int, and the WIT keeps the request and the response of the proto. Each directive is general, not only for Streams.How did you test it?
Link to a test plan if any -
The Python stream tests check the wrapped values and the result field. A fixture checks that Go refuses them.