Repository navigation
Conversation
moetemp
marked this pull request as draft
October 27, 2026 07:48
moetemp
force-pushed
the
moe/up/resource-type-params-through-protos
branch
from
October 28, 2026 16:37
4545d1f to
be2ac92
Compare
This was referenced Oct 28, 2026
This was referenced Oct 28, 2026
1 of 3 tasks
moetemp
force-pushed
the
moe/up/flattened-setup-indent
branch
from
October 29, 2026 04:00
026f1d0 to
2b18cce
Compare
moetemp
force-pushed
the
moe/up/resource-type-params-through-protos
branch
2 times, most recently
from
October 29, 2026 06:28
2acc4e9 to
fb0aedf
Compare
moetemp
force-pushed
the
moe/up/flattened-setup-indent
branch
from
October 29, 2026 06:28
2b18cce to
bca32e1
Compare
moetemp
force-pushed
the
moe/up/resource-type-params-through-protos
branch
from
October 29, 2026 07:00
fb0aedf to
cc6f8ba
Compare
Before planning, a proto-backed record is named by its proto type, so the walk for a resource's type parameters stopped there. nexgen then wrote generic models for a resource class that isn't generic, and the code didn't compile. The checks of the resource and of the operations that its methods bind both walk through protos.
moetemp
force-pushed
the
moe/up/resource-type-params-through-protos
branch
from
October 29, 2026 07:35
cc6f8ba to
e7f9b2e
Compare
moetemp
force-pushed
the
moe/up/flattened-setup-indent
branch
from
October 29, 2026 07:35
1967f3a to
cf1a028
Compare
Contributor
Author
|
Closing this. moetemp#78 takes the check, where the stream sample needs 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 refuses a resource that reaches a type parameter through a proto-backed record, as nexgen refuses one that reaches it through a plain record. The check of each operation that a resource method binds walks through protos too. Planning and the generated code don't change.
It's based on #303.
Why?
nexgen generated generic models for a resource class that isn't generic, so the code didn't compile or type-check. For example, with Brook's Stream WIT, the Python resource methods took
AppendRecord[EventT]with noEventTin scope.How did you test it?
Link to a test plan if any -
The new rejection fixtures
type-parameters/generic-proto-resourceandtype-parameters/generic-proto-resource-operationfail without the fix.