Repository navigation
Pin generation 922847b, check clashes among reached protocols, spell nested protocol paths with :: - #169
Merged
Conversation
…ell nested protocol paths with :: - generation rev bumped to 922847b (#148) in codegen and xtask. - connections::check_in(req) replaces check, so a dependency's jsonrpc protocol sharing a method name with the package's own no longer refuses generation (generation#147). - A protocol's path in the Hello comment, PROTOCOLS and checkCall reads chat::admin::Admin, not chat/admin::Admin. Display text only; no number, order or hash is made from 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.
Follows generation#147 and generation#148.
What changes
922847b(codegencomline-codegenandcomline-conformance, xtask). Core stays at868e8310. The generators already useaddressing_in, so jsonrpc@1: check result as JSON and pass it on as written, not parsed #148'saddressing(&GenerateRequest)needed nothing here.connections::check(&req.schemas, &req.encodings)becomesconnections::check_in(req): only the protocols the package reaches take part, so a dependency'sjsonrpcprotocol sharing a function name with the package's own no longer refuses generation.{namespace}::{name}from the request's/-joined namespace, givingchat/admin::Admin. It now readschat::admin::Adminin the Hello comment,PROTOCOLS, and thecheckCalltext (whatUnavailableandwarningsshow). One helper,display_path, built onfacts::namespace_segments(the segmentscanonical_namespacejoins with/).Display text only.
CONNECTION_IR_HASHisconnection_ir_hash(&req.schemas)andIR_HASHisschema_ir_hash(units); neither reads this string, and the Hello bytes come from the facts. Wire numbers and ordering are unchanged.Tests (
codegen/tests/nested_namespaces.rs)nested_protocol()fixture: the Hello comment,PROTOCOLSandcheckCallreadchat::admin::Admin; nochat/admin::anywhere in the output.checkCallare unchanged for it.dependency_and_own_protocols()switched tojsonrpc, plus a client-providedEventsso the protocols share a connection: the oldcheckrefuses it,check_indoesn't, generation succeeds and the dependency's protocol is offServices. Two of the package's own with the same function name still clash.Goldens
No existing golden changes (they all have one-segment namespaces). Two new ones,
runtime/test/generated/nested/andruntime/test/generated/clash/, sonpm run typecheck:generatedcovers the new output.