Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Generator support drift
name: Language support drift

# `reference/generator-support.md` carries a copy of generation's
# `FEATURES.md`: the matrix its conformance suite proves. This checks the copy
# is current. Like the IDL drift check it needs no Rust build, only a fetch,
# The Reference -> Languages pages are rendered from what the conformance
# suites prove: generation's `features.json`, and the runtime wire corpus
# with each runtime's report. This checks they're current. Like the IDL drift check it needs no Rust build, only a fetch,
# so it runs per pull request. It's kept separate from the Docs workflow,
# because a fetch from another repo shouldn't be able to block a deploy.

on:
schedule:
# A generator gaining a feature never touches this repo, so a
# A generator or runtime gaining a feature never touches this repo, so a
# push-triggered run would not see it. Weekly catches that side.
- cron: '45 7 * * 1'
pull_request:
paths:
- 'docs/docs/reference/generator-support.md'
- 'scripts/sync-generator-support.py'
- '.github/workflows/generator-support-drift.yml'
- 'docs/docs/reference/languages/**'
- 'scripts/sync-language-support.py'
- '.github/workflows/language-support-drift.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: generator-support-drift-${{ github.ref }}
group: language-support-drift-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -38,9 +38,9 @@ jobs:
- name: Check for drift
shell: bash
run: |
if ! python3 scripts/sync-generator-support.py --check | tee drift.txt; then
if ! python3 scripts/sync-language-support.py --check | tee drift.txt; then
{
echo '### Generator support drift'
echo '### Language support drift'
echo
echo '```'
cat drift.txt
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/design/core-target-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ built and tested (no more `todo!()` on this path):

**A package-wide default** ([generation#17](https://github.com/ComlineProject/generation/pull/17) + [comline-rust#10](https://github.com/ComlineProject/comline-rust/pull/10) + [cli#27](https://github.com/ComlineProject/cli/pull/27)). `comline.toml`'s `[generate] default_framing` (per-`[[generate.target]]` overridable) rides `GenRequest.default_framing` to the generator and applies to every protocol with no `@framing` of its own. Resolution is `@framing` → package default → datagram. The contract crate treats the value as an opaque name; the target generator validates it.

**The wire is pinned by examples, not only by this prose.** The [wire corpus](https://github.com/ComlineProject/runtime/tree/main/runtime/conformance) in the `runtime` repository holds byte-exact vectors for the name hash, the handshake, the envelope, both framings and both wire formats, including bytes that must be refused. They're the normative examples: where this page and a vector disagree, the vector is what peers speak. They're computed from `comline-runtime`, so a change to them is a wire change and shows in review. Every runtime proves its support against them; what each one passes is on its [language reference page](../reference/languages/index.md#runtimes-side-by-side).

Still open, to fix as part of this design:

- The `Alloc` seam for owned bits (`.to_owned()`, decoded collection spines).
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guide/idl/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
without a default, or an undeclared `params.*` reference all fail the build. Generated **Rust** code then
[runs them](#in-generated-code). Generated TypeScript doesn't yet: it
generates the types without the checks, and `comline generate` warns. See
[Generator support](../../reference/generator-support.md).
[TypeScript's language reference](../../reference/languages/typescript.md#code-generation).

A **validator** is a named, parameterised check you attach to a
[struct](structure.md) or [error](error.md) field, or to a
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/languages/rust/framing-and-wire-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ the same format.

## Shipped combinations

What the runtime is proven to speak, feature by feature, is on the
[Rust reference page](../../reference/languages/rust.md#runtime).

| Framing | Wire format | Ships |
|---|---|---|
| `datagram` | `json` | ✅ |
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/languages/typescript/framing-and-wire-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const client = await ChatClient.connect(transport, new JsonCodec());

## Shipped combinations

What the runtime is proven to speak, feature by feature, is on the
[TypeScript reference page](../../reference/languages/typescript.md#runtime).

Narrower than Rust's, for the same reason — no MessagePack codec yet:

| Framing | Wire format | Ships |
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ parse → resolve imports → validate → (freeze into .comline/) → (generate
| `comline clean [--dry-run]` | Remove generated code (the `generate` output root or files). Never touches `.comline/`. |
| `comline reset [--force] [--dry-run]` | **Destructive.** Delete `.comline/` — the whole version history, no undo — *and* generated code. Next `build` starts over at `0.0.1`. On a terminal it shows how many versions will be lost and makes you type `reset`; without a terminal it refuses (exit `2`) unless `--force`. |
| `comline completions <shell>` | Print a completion script to stdout. `bash` `zsh` `fish` `powershell` `elvish`. |
| `comline targets [--features [--json]]` | Print one `language#version` per line to stdout — the token syntax `config.idp`'s `code_generation.languages` expects — for every generator this binary was compiled with. Ignores `--path`: it reflects the build, not a project. `--features` also lists what each generator supports, feature by feature ([Generator support](generator-support.md)); `--json` prints that as JSON. |
| `comline targets [--features [--json]]` | Print one `language#version` per line to stdout — the token syntax `config.idp`'s `code_generation.languages` expects — for every generator this binary was compiled with. Ignores `--path`: it reflects the build, not a project. `--features` also lists what each generator supports, feature by feature ([Languages](languages/index.md)); `--json` prints that as JSON. |

`--out` / `--layout` / `--mode` override one target and need `--target` when
several are configured. `COMLINE_GENERATE_OUT` / `_LAYOUT` / `_MODE` do the same
Expand Down
75 changes: 0 additions & 75 deletions docs/docs/reference/generator-support.md

This file was deleted.

Loading
Loading