Skip to content

Validate default_framing; an unknown name is an error - #84

Merged
Kinflou merged 2 commits into
mainfrom
fix/validate-default-framing
Oct 20, 2026
Merged

Kinflou merged 2 commits into
mainfrom
fix/validate-default-framing

Conversation

@Kinflou

@Kinflou Kinflou commented Oct 20, 2026

Copy link
Copy Markdown
Member

Fixes #81.

default_framing in comline.toml was passed to the generators unchecked, and both fell back to datagram for a name they didn't recognise. A typo such as jsonrcp generated datagram with exit code 0 and only surfaced as a refused handshake.

Target resolution now folds the value onto @framing's canonical spelling with core's canonical_value (so json-rpc reaches the generator as jsonrpc), and an unknown one is an error naming the accepted values, with a "did you mean" for a near miss:

`default_framing = "jsonrcp"` for target `rust` - expected one of `jsonrpc`, `datagram` - did you mean `jsonrpc`?

The generators refuse an unknown name too (comline-rust and comline-typescript PRs), since the CLI isn't their only caller. default_framing is later moving to config.idp (core#117); this is the short-term fix.

@Kinflou
Kinflou merged commit 1615b71 into main Oct 20, 2026
2 checks passed
@Kinflou
Kinflou deleted the fix/validate-default-framing branch October 20, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unknown default_framing silently generates datagram

1 participant