From aa324fc5fdb7151023958514eb597baab194d5ac Mon Sep 17 00:00:00 2001 From: Kinflou Date: Wed, 2 Sep 2026 16:24:06 +0800 Subject: [PATCH] chore(conformance): bless TS goldens for the protocol RPC shape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the comline-codegen-typescript pin to comline-typescript c535f14 (IR_HASH + params interfaces + discriminated-union error types + async methods) and re-blesses: - protocol/typescript.ts — the full new shape - primitives/typescript.ts — `u128` now maps to `bigint` The `protocol` fixture's `IR_HASH` matches the Rust golden's exactly — the canonical `schema_ir_hash` is language-neutral. --- conformance/Cargo.toml | 2 +- .../tests/golden/primitives/typescript.ts | 2 +- .../tests/golden/protocol/typescript.ts | 28 +++++++++++++++++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/conformance/Cargo.toml b/conformance/Cargo.toml index d1d0a7e..eb0e570 100644 --- a/conformance/Cargo.toml +++ b/conformance/Cargo.toml @@ -16,4 +16,4 @@ comline-core = { git = "https://github.com/ComlineProject/core", rev = "50c17cc7 [dev-dependencies] comline-codegen = { path = "../codegen" } comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "17c7b2318d89926458ec92e1b223dbf58ff36f1f" } -comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "4fe8182a904791e00cf963814432d7e06c9fe810" } +comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "c535f141cdae5c73257c8236826560554c5e7719" } diff --git a/conformance/tests/golden/primitives/typescript.ts b/conformance/tests/golden/primitives/typescript.ts index af35713..dfd8d34 100644 --- a/conformance/tests/golden/primitives/typescript.ts +++ b/conformance/tests/golden/primitives/typescript.ts @@ -5,7 +5,7 @@ export interface Scalars { small: number; medium: number; large: number; - huge: u128; + huge: bigint; signed_small: number; signed_large: number; name: string; diff --git a/conformance/tests/golden/protocol/typescript.ts b/conformance/tests/golden/protocol/typescript.ts index fc595e5..450913d 100644 --- a/conformance/tests/golden/protocol/typescript.ts +++ b/conformance/tests/golden/protocol/typescript.ts @@ -1,8 +1,30 @@ // Generated by Comline +// Canonical digest of the frozen IR this file was generated from — the +// two ends of a connection must agree on it. +export const IR_HASH = 0xbdbe5c6fd7420bd0n; + +export interface NotFound { +} + +export interface ServiceLookupParams { + id: number; +} + +export interface ServiceNotifyParams { + code: number; +} + +export type ServiceLookupError = + | { code: 0; name: "NotFound"; data: NotFound }; + +export type ServiceError = + | { code: 0; name: "NotFound"; data: NotFound }; + export interface Service { - lookup(id: number): Record; - count(): number; - notify(code: number): void; + /** @throws {ServiceLookupError} */ + lookup(params: ServiceLookupParams): Promise; + count(): Promise; + notify(params: ServiceNotifyParams): Promise; }