Skip to content

test: end-to-end — a generated protocol crate runs a real round-trip - #24

Merged
Kinflou merged 2 commits into
mainfrom
feat/e2e-protocol
Sep 1, 2026
Merged

test: end-to-end — a generated protocol crate runs a real round-trip#24
Kinflou merged 2 commits into
mainfrom
feat/e2e-protocol

Conversation

@Kinflou

@Kinflou Kinflou commented Sep 1, 2026

Copy link
Copy Markdown
Member

The whole pipeline, for real.

tests/fixtures/chat_project/src/chat.ids — a struct, an error, a protocol with a throwing request/response call and a one-way call:

protocol Chat {
    function send(text: str) -> Message ! Rejected;
    function note(text: str);
}

comline generate --target rust --mode lib via the actual binary → the emitted crate is compiled against comline-runtime → a hand-written driver runs ChatClientChatDispatcher over duplex():

  • a request/response call (send("hi") -> Message),
  • a raised Rejected reaching the client typed (CallError::App(ChatSendError::Rejected)),
  • a one-way note("saved") landing on the provider.

Gap this surfaced (and fixed)

cli/Cargo.toml pinned comline-codegen-rust at the pre-protocol-codegen rev (a70cafcd — the core rev-bump), so comline generate still emitted the old bare-trait shape (fn send(text: String) -> Message;, no Dispatch, no Client, no comline-runtime dep). Bumped to comline-rust main (1191e76 — PRs #2#4) and comline-codegen-typescript to its merged rev.

Cost

tests/cli/end_to_end.rs fetches + builds comline-runtime (~25s) and needs network — the price of a genuine end-to-end check. util.rs gains copy_fixture(name, temp); full suite 37 integration tests green.

Kinflou added 2 commits September 2, 2026 02:04
The whole pipeline for real: `tests/fixtures/chat_project/src/chat.ids`
(a struct, an error, a protocol with a throwing request/response call and
a one-way call) → `comline generate --mode lib` via the actual binary →
the emitted crate compiled against comline-runtime → a hand-written driver
runs ChatClient ⇆ ChatDispatcher over `duplex()`: a request/response call,
a raised `Rejected` reaching the client typed, and a one-way `note`.

Surfaced and fixed a real gap: cli pinned `comline-codegen-rust` at the
pre-protocol-codegen rev (`a70cafcd`), so `comline generate` still emitted
the old bare-trait shape. Bumped to comline-rust main (`1191e76`, PRs 2-4)
and `comline-codegen-typescript` to its merged rev.

tests/cli/end_to_end.rs is slow (fetches + builds comline-runtime, ~25s)
and needs network. util.rs gains `copy_fixture(name, temp)`.
@Kinflou
Kinflou merged commit dea99f7 into main Sep 1, 2026
2 checks passed
@Kinflou
Kinflou deleted the feat/e2e-protocol branch September 2, 2026 07:21
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.

1 participant