From 704bc7a68b2e822cdcad63ce5db2cbbd6ba10071 Mon Sep 17 00:00:00 2001 From: Kinflou Date: Fri, 13 Nov 2026 06:58:32 +0800 Subject: [PATCH] Use the CLI's new command names (cli#153) --- codegen/src/config.rs | 8 ++++---- codegen/src/encodings.rs | 2 +- codegen/src/facts.rs | 8 ++++---- conformance/src/lib.rs | 2 +- conformance/tests/conformance.rs | 2 +- schemas/comline-toml.json | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/codegen/src/config.rs b/codegen/src/config.rs index 660499e..2b9917b 100644 --- a/codegen/src/config.rs +++ b/codegen/src/config.rs @@ -112,7 +112,7 @@ impl<'de> Deserialize<'de> for VersionSpec { } } -/// `comline.toml`: where `comline generate` writes code, and how. Which +/// `comline.toml`: where `comline generation` writes code, and how. Which /// languages are generated comes from `config.idp`'s /// `code_generation.languages`; this file says where each one lands. // An absent file parses as `Self::default`. @@ -340,7 +340,7 @@ pub struct Target { /// package declares under `code_generation.languages` in `config.idp`. /// With `generator`, it also picks among the languages that generator /// offers, and may be left out when it offers one. - // `comline generate` fills it in from the generator before [`resolve`]. + // `comline generation` fills it in from the generator before [`resolve`]. #[serde(default)] #[schemars(transform = no_default)] pub language: String, @@ -581,7 +581,7 @@ pub struct DeclaredLang { pub lang_version: String, } -/// CLI flag overrides for `comline generate`. +/// CLI flag overrides for `comline generation`. #[derive(Debug, Default)] pub struct Overrides<'a> { pub target: Option<&'a str>, @@ -631,7 +631,7 @@ pub struct ResolvedTarget { } /// Merge `comline.toml`, the congregation's declared languages and CLI flags -/// into the concrete set of targets `generate` should emit. +/// into the concrete set of targets `comline generation` should emit. /// /// **The declared languages are the set.** `config.idp`'s /// `code_generation.languages` says which languages this package is generated diff --git a/codegen/src/encodings.rs b/codegen/src/encodings.rs index 3fd132a..6630ef4 100644 --- a/codegen/src/encodings.rs +++ b/codegen/src/encodings.rs @@ -77,7 +77,7 @@ pub fn used( /// [`official::units`], `declared` the frozen configs of the package and its /// dependencies (anything but [`ConfigUnit::Encoding`] is skipped). A /// framing nothing in view declares writes no JSON. What [`fill`] uses, so -/// an editor calling this expects what `comline generate` will. +/// an editor calling this expects what `comline generation` will. pub fn used_as_declared( schemas: &[(String, Vec)], wire_format: &str, diff --git a/codegen/src/facts.rs b/codegen/src/facts.rs index 0526012..d5737e0 100644 --- a/codegen/src/facts.rs +++ b/codegen/src/facts.rs @@ -5,7 +5,7 @@ //! Core computes them from the package's history (`comline_core::compat`), //! which a generator never sees: it reads frozen IR only, without core's //! compiler. These types mirror core's `PackageFacts`, field for field and -//! with the same JSON, so `comline generate` hands them over as they are. +//! with the same JSON, so `comline generation` hands them over as they are. //! //! **Numbers are never guessed.** A protocol that needs them and has none in //! the facts is refused ([`check`]): falling back to its position would make @@ -162,7 +162,7 @@ pub fn addressing( facts.functions.iter().find(|ff| ff.name == *f).map(|ff| ff.number).ok_or_else(|| { eyre!( "protocol `{namespace}::{name}`, function `{f}`: the facts have no wire number for it, so they \ - are older than the schema; run `comline build`, then generate again" + are older than the schema; run `comline build`, then run `comline generation` again" ) }) }) @@ -181,7 +181,7 @@ fn missing(req_facts: Option<&PackageFacts>, namespace: &str, name: &str, parame ); match req_facts { None => eyre!( - "{why}, and the request carries no facts: `comline generate` supplies them from the package's build \ + "{why}, and the request carries no facts: `comline generation` supplies them from the package's build \ history (run `comline build` first)" ), Some(_) => eyre!( @@ -305,7 +305,7 @@ pub struct HelloProtocol { pub fn hello(req: &GenerateRequest, connection: &PackageConnection) -> Result<(Vec, Vec)> { let facts = req.facts.as_ref().ok_or_else(|| { eyre!( - "the package's connection runs `comline@2`, and the request carries no facts: `comline generate` \ + "the package's connection runs `comline@2`, and the request carries no facts: `comline generation` \ supplies them from the package's build history (run `comline build` first)" ) })?; diff --git a/conformance/src/lib.rs b/conformance/src/lib.rs index 0dd5da4..701a730 100644 --- a/conformance/src/lib.rs +++ b/conformance/src/lib.rs @@ -842,7 +842,7 @@ fn handshake_comline2() -> Fixture { } /// The facts a package's history would give `schemas` (`comline_core::compat`): -/// what `comline generate` supplies for a package that needs them. Here the +/// what `comline generation` supplies for a package that needs them. Here the /// numbers run backwards from the declaration order, so a golden shows them /// apart from positions; the hashes are fixed stand-ins. pub fn facts_for(schemas: &[(String, Vec)], wire_format: &str) -> comline_codegen::facts::PackageFacts { diff --git a/conformance/tests/conformance.rs b/conformance/tests/conformance.rs index 4ad95a5..202b887 100644 --- a/conformance/tests/conformance.rs +++ b/conformance/tests/conformance.rs @@ -113,7 +113,7 @@ fn request_for( validate_on_decode: options.validate_on_decode, async_api: options.async_api, encodings: comline_codegen::encodings::official_for(lang), - // Only a package that needs them gets facts, as from `comline generate`. + // Only a package that needs them gets facts, as from `comline generation`. facts: comline_codegen::facts::needed(schemas, &comline_codegen::encodings::official_for(lang)).then(|| { comline_conformance::facts_for(schemas, options.wire_format.as_deref().unwrap_or(DEFAULT_FORMAT)) }), diff --git a/schemas/comline-toml.json b/schemas/comline-toml.json index 32fbca8..172b1f0 100644 --- a/schemas/comline-toml.json +++ b/schemas/comline-toml.json @@ -359,7 +359,7 @@ "description": "Which package versions to generate bindings for: `latest` (the working tree, the default), `all` (every committed version), or one version or a list of them, each a version string or commit hash." } }, - "description": "`comline.toml`: where `comline generate` writes code, and how. Which\nlanguages are generated comes from `config.idp`'s\n`code_generation.languages`; this file says where each one lands.", + "description": "`comline.toml`: where `comline generation` writes code, and how. Which\nlanguages are generated comes from `config.idp`'s\n`code_generation.languages`; this file says where each one lands.", "properties": { "doc": { "allOf": [