Skip to content

conformance: a generator-agnostic harness, and no generator dependency - #159

Merged
Kinflou merged 2 commits into
masterfrom
conformance/generator-agnostic-harness
Nov 16, 2026
Merged

Kinflou merged 2 commits into
masterfrom
conformance/generator-agnostic-harness

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Removes the dependency cycle between this repository and the two generator repositories.

The cycle

comline-conformance dev-depended on comline-codegen-rust and comline-codegen-typescript, and both of those depend on comline-codegen here. Every core bump took four rounds: pin generation, pin the generators to it, re-pin generation's conformance to the generators, re-pin the generators to generation's merge. A [patch] in the workspace folded the two copies of comline-codegen into one.

The change

generation depends only on core. What needed a generator moves to the generators:

  • conformance/src/harness.rs (new, comline_conformance::harness): the generator-agnostic half of the old conformance/tests/conformance.rs. A generator describes itself as a Generator (language, generate, register, SUPPORT, VERSIONS) and calls corpus_matches_golden, the_protocol_generates_what_the_generator_does and support_is_proven. The logic is the old test's, parameterised by one generator instead of looping over LANGS; the goldens root and the report directory are arguments.
  • conformance/tests/conformance.rs and conformance/tests/golden/ are removed. The goldens are in comline-rust#138 and comline-typescript#177, byte-identical (sha256 of each of the 136 files unchanged; nothing re-blessed).
  • conformance/tests/dependency_protocols.rs and nested_protocols.rs stay: they need no generator.
  • The generator dev-deps and the [patch."https://github.com/ComlineProject/generation"] section are gone. eyre and serde_json become normal dependencies of comline-conformance, since the harness uses them.
  • The combined FEATURES.md and features.json are removed. Writing them needed both generators in one build. Each generator now writes its own (generators holding one entry; its features list is the same), and features.json is exactly the old file's entry for that generator.
  • README, conformance README and two doc comments say where things are now.

Consumers of the combined features.json (not changed here)

It is read from this repository's master by docs (scripts/sync-language-support.py, --file / --rev, and the weekly language-support-drift.yml) and by the Observatory (sources.toml, source codegen, repo = "generation"). Merging this before they read the generators' files breaks both. The Observatory already combines sources with the same matrix, so it needs a second source entry. The docs script needs to read the two files and join their generators.

Order

The generators pin this branch's head (31e808ff) until this merges; they re-pin after.

Kinflou added 2 commits November 16, 2026 21:59
comline-conformance dev-depended on comline-codegen-rust and
comline-codegen-typescript, which depend on comline-codegen here, so every
core bump went round the cycle twice. The three suites that need a generator
(the protocol round trip, the golden comparison, the support proofs) move into
the crate as comline_conformance::harness, parameterised by a Generator, and
each generator repository runs them over its own output against goldens it
holds. generation now depends on core only; the [patch] that folded the two
copies of comline-codegen into one goes with the dev-deps.

The goldens and the combined FEATURES.md/features.json leave with the
generators: each generator's repository holds its own goldens and its own
report.
@Kinflou
Kinflou marked this pull request as ready for review November 16, 2026 15:34
@Kinflou
Kinflou merged commit 37ed342 into master Nov 16, 2026
23 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