Skip to content

Leave unreached dependency protocols off the connection (generation#143) - #168

Merged
Kinflou merged 2 commits into
mainfrom
fix/unreached-dependency-protocols
Nov 14, 2026
Merged

Kinflou merged 2 commits into
mainfrom
fix/unreached-dependency-protocols

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 14, 2026

Copy link
Copy Markdown
Member

Adopts ComlineProject/generation#146 (da81b68), which closes generation#143: a dependency's protocol the package doesn't reach (none can be yet, core#277) is generated as a type, but is never addressed by the package's wire numbers, checked, or put on its connection.

At the previous pin, a package with a protocol of its own also had the dependency's protocol in Services, the package connection.

Changes

  • Pin comline-codegen and comline-conformance (codegen, xtask) at da81b68. Core stays at 868e831.
  • connections::package_connection -> package_connection_among(&req.schemas, &req.dependencies).
  • connections::on_connection -> on_connection_among(schemas, &req.dependencies, ..) (the schema emitter, derived names).
  • facts::addressing -> addressing_in(req, ..): a dependency's protocol is addressed by position.
  • checkCall is imported only for a protocol the package reaches.
  • facts::check(req) already took the request; facts::hello takes the connection built above.

Tests

codegen/tests/dependency_protocols.rs generates generation's dependency_protocol() and dependency_and_own_protocols() fixtures. Output is kept in runtime/test/generated/dependency/{only,own} (blessed with TS_BLESS=1), so the Node job's typecheck:generated type-checks it. Asserts:

  • the dependency-only package has no connection.ts;
  • in the second fixture, Services, the Hello and the protocol map name only Chat, with no Foo or localdeps in connection.ts;
  • the dependency's protocol is still generated as types.

stdio.rs and generate.rs fill the new GenerateRequest::dependencies.

Not done

connections::check (bare-name clashes) has no dependency-aware variant in generation#146 and still sees a dependency's protocols. The CLI filling GenerateRequest::dependencies is a follow-up in cli (generation#146's list).

Kinflou added 2 commits November 15, 2026 02:56
Pin generation at da81b68 and use its dependency-aware entry points:
package_connection_among, on_connection_among and addressing_in, with the
request's dependencies. A dependency's protocol is still generated as a
type, but is no longer in Services, the package connection or the Hello,
and is addressed by position.
@Kinflou
Kinflou marked this pull request as ready for review November 14, 2026 19:29
@Kinflou
Kinflou merged commit dba38c8 into main Nov 14, 2026
41 checks passed
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