Repository navigation
JSON-RPC on a connection: the package rule, method names, clashes - #81
Merged
Merged
Conversation
added 2 commits
October 25, 2026 01:49
…lashes `connections::framing` reads a protocol's `@framing` in either form (core's `FramingValue`), falling back to the package's default. Once any JSON-RPC protocol in a package runs on a connection, every JSON-RPC protocol does, so `on_connection` takes the package's schemas. `method_name` gives the method JSON-RPC calls a function by: the function's name, or `namespace.Protocol/function` when the schema says `method_names = qualified`. `check` refuses bare names one side of a connection couldn't tell apart.
A `connections_jsonrpc` fixture: `connections` with `Chat` on plain
`"jsonrpc"` (on the connection by the package rule) and `Events` on
`{ name = "jsonrpc", method_names = qualified }`. Both generators now
claim `connections` supported, and this proves it. Pins comline-rust#74
and comline-typescript#69.
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.
The kernel part of JSON-RPC on a connection, plus its conformance fixture. Part of the cascade with core#138 (the
@framingdictionary), runtime#25, comline-rust#74 and comline-typescript#69.codegen(9b10108), which the generators pin:connections::framingreads a protocol's@framingin either form, through core'sFramingValue, falling back to the package'sdefault_framing.features::usedreads it the same way.on_connectiontakes the package's schemas to decide this. Adatagram@2connection doesn't take JSON-RPC protocols with it.method_namegives the method JSON-RPC calls a function by: the bare name, ornamespace.Protocol/functionundermethod_names = qualified. Nested namespaces join with dots, e.g.chat.admin.Admin/kick.checkandbare_name_clashesrefuse bare names one side of a connection couldn't tell apart: two protocols the same side provides, each with a function of the same name. The fix in the message ismethod_names = qualified. Lockstep protocols never clash, since a server serves one protocol.conformance(second commit):connections_jsonrpcfixture:Chaton plain"jsonrpc"andEventson the qualified dictionary.connections✅ supported (it was 🟡 partial), and FEATURES.md and features.json say so.connections_asyncgolden changes only in its header comment, which names the runtime revision.Tested: kernel unit tests for the reader, the package rule, method names and the clash check. Conformance passes for both generators.