Repository navigation
Take nested-schema protocols' facts and dependency-aware clash checks from generation 922847b - #161
Merged
Merged
Conversation
added 2 commits
November 15, 2026 05:18
…tion#147, #148) On the old generation pin: a package with a protocol in src/chat/admin.ids is refused for want of facts, and a dependency's jsonrpc method name clashes with the package's own.
…s among the package's own protocols The build's method-name clash check takes the package's dependency names from its compiled context, as comline generation does, so a dependency's jsonrpc protocol is no clash for the package's own. The test now gives the package a client-provided protocol, which is what puts its jsonrpc protocols on a connection.
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 (dependency-aware clash checks) and generation#148 (
chat/adminandchat::adminmeet when looking up a protocol's facts).The failing case: a package whose protocols are in nested schemas (
src/chat/admin.ids) on the defaults (datagram@3+comline@2).comline generationrefused it withbecause the request spells the namespace
chat/admin(sc.namespace.join("/")) and core's facts spell itchat::admin.Changes
comline-codegen,comline-doc-markdown,comline-doc-htmlto generation922847b,comline-codegen-rustto comline-rust#128 (ac7fd8b) andcomline-codegen-typescriptto comline-typescript#169 (4db92c2). Core stays at868e831. Manifest edit only; Cargo resolved the lockfile.src/lang_targets.rs: the build's clash check ischecks::method_name_clashes_among(&schemas, &dependencies, &framings), with the dependency names taken from the compiled context'sdependency_configs, ascommands/generation.rsdoes forGenerateRequest::dependencies.Tests
generation::a_protocol_in_a_nested_schema_finds_its_factsandgeneration::a_built_versions_nested_protocol_finds_its_facts_too(package_versions = "all"after build and release): no dependencies,src/chat/admin.ids,comline generationfor rust and typescript succeeds and writes the files.build::a_dependencys_jsonrpc_method_name_is_no_clash_for_the_packages_own: a package depending on a local package whose jsonrpcChat::sendshares a name with the package's own jsonrpcAdmin::sendis not refused. The package has a client-provided protocol, which is what puts its jsonrpc protocols on a connection.They fail on the old pin
The first commit on this branch is the tests alone, on the old pin (generation
da81b68, generators6db2757/bcec31d). Its CI run (https://github.com/ComlineProject/cli/actions/runs/43642136677) failed on every test job with both nested-schema tests, with exactly the error above. The clash test passed there only because its first version didn't put the package's protocols on a connection; I fixed it (checked locally: it fails withprotocols admin::Admin and shared/chat::Chat both have a function sendwhen only the generation pin is bumped andlang_targets.rsis left alone, and passes with the change).