feat(generate): comline.toml default_framing - #27
Merged
Conversation
`[generate] default_framing` (and per-`[[generate.target]]` override) names
the wire framing protocols use when they don't pick one with `@framing`.
Resolved `[[target]]` → `[generate]` → unset, then handed to the generator
on `GenRequest.default_framing`. No flag / env override — it shapes the
generated API, it's not a per-run knob.
Rev bumps: comline-codegen → generation c70336d, comline-codegen-rust →
comline-rust 85fd967, comline-codegen-typescript → comline-typescript f72bc3e
(kept in lockstep so the build resolves one comline-codegen).
tests:
- gen_config: section value reaches a declared target; `[[target]]` wins;
absent ⇒ None
- tests/cli/generate: `default_framing = "jsonrpc"` in comline.toml makes
the generated `chat.rs` emit the JSON-RPC stack; without it, datagram
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.
Final code PR of the
default_framingchain (after generation#17, comline-rust#10, comline-typescript#3).comline.tomlcan now say a package speaks JSON-RPC without annotating everyprotocol:Resolved
[[target]]→[generate]→ unset (mirrorspackage_versions), then carried to the generator onGenRequest.default_framing. No CLI flag or env override — it shapes the generated API surface, not a per-run detail.comline new's template gains the commented key.Rev bumps (kept in lockstep so the build resolves one
comline-codegen):comline-codegen→ generationc70336dcomline-codegen-rust→ comline-rust85fd967comline-codegen-typescript→ comline-typescriptf72bc3eTests
gen_config: section value reaches a declared target;[[target]]beats[generate]; absent ⇒None.tests/cli/generate:default_framing = "jsonrpc"incomline.tomlmakes the generatedchat.rsemitJsonRpcFraming+connect_with_framing; with nocomline.toml, it stays onFRAMING_DATAGRAM.