From 6e39771477f7f6c73f9817ab772325293d37ba24 Mon Sep 17 00:00:00 2001 From: Kinflou Date: Fri, 13 Nov 2026 06:57:38 +0800 Subject: [PATCH] Use the CLI's new command names (cli#153) --- README.md | 2 +- src/acceptance.rs | 4 ++-- src/analysis/comline_toml.rs | 12 ++++++------ src/analysis/generation.rs | 2 +- src/analysis/source.rs | 2 +- src/handlers/comline_toml.rs | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2f5e9e3..ab69109 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Language Server Protocol (LSP) implementation for [Comline](https://github.com - **Diagnostics** - Real-time syntax errors plus `comline-core`'s validation pass (undefined types, duplicate declarations, ...) — the same checks `comline build` runs. A type from another file of the package used without a `use` gets a specific error with an **"Add `use ...`" quick fix** - **Whole-package analysis** - every `.ids` file in a package's `src/` takes part, open or not, kept current through file watching; each package only sees its own files -- **Dependency packages** - the dependencies `config.idp` declares are indexed (path dependencies, and git pins `comline check` has fetched; the editor never fetches), so imports, hover, go-to-definition and completion work into them under the dependency's name. Unresolved imports are errors, worded like `comline check`'s, with a "did you mean" quick fix; imports of a dependency that isn't fetched yet are marked as not checked, and its `config.idp` entry says why. A dependency whose `@unverified` protocols aren't accepted is an error on its entry, with a quick fix that writes the `accept_unverified` line `comline accept` would +- **Dependency packages** - the dependencies `config.idp` declares are indexed (path dependencies, and git pins `comline check` has fetched; the editor never fetches), so imports, hover, go-to-definition and completion work into them under the dependency's name. Unresolved imports are errors, worded like `comline check`'s, with a "did you mean" quick fix; imports of a dependency that isn't fetched yet are marked as not checked, and its `config.idp` entry says why. A dependency whose `@unverified` protocols aren't accepted is an error on its entry, with a quick fix that writes the `accept_unverified` line `comline deps accept` would - **Standard library** - `use std::…` resolves against the std embedded in `comline-core`, like a read-only dependency: hover, go-to-definition (into virtual `comline-std:` documents, whose text clients fetch with the `comline/stdSource` request), completion, and unresolved-import errors worded like `comline check`'s (`std has no schema matching 'std::htp::Request' - did you mean 'std::http'?`) - **Module docs** - a schema documents itself with `//!` lines at its top, a package with the same at the top of its `config.idp`. Hover any segment of a path (`std`, `validators` in `use std::validators::StringBounds`, or in a qualified type name) for that module's docs, the modules below it and the types it declares; `use` completion shows the same docs beside each module and declaration. `std` and each of its modules are documented this way - **Document Symbols** - Hierarchical outline view of structs, enums, protocols, and constants diff --git a/src/acceptance.rs b/src/acceptance.rs index dd0642c..1105edb 100644 --- a/src/acceptance.rs +++ b/src/acceptance.rs @@ -3,7 +3,7 @@ //! `comline check` refuses a dependency whose `@unverified` protocols the //! consumer hasn't accepted, for exactly the guarantees they give up. The //! editor says so on the dependency's entry, and offers a quick fix that -//! writes the `accept_unverified` line `comline accept` would. +//! writes the `accept_unverified` line `comline deps accept` would. //! //! What a protocol gives up is worked out by core, so the dependency is //! compiled as its own package (its own settings and default handshake), @@ -242,7 +242,7 @@ fn render(accepted: &BTreeMap>) -> String { } /// `manifest` with `name`'s entry carrying `accept_unverified = accepted`, -/// replacing one already there - the edit `comline accept` makes. Every +/// replacing one already there - the edit `comline deps accept` makes. Every /// other byte is left as written. fn with_acceptance( manifest: &str, diff --git a/src/analysis/comline_toml.rs b/src/analysis/comline_toml.rs index 9626983..6c4bc96 100644 --- a/src/analysis/comline_toml.rs +++ b/src/analysis/comline_toml.rs @@ -1,5 +1,5 @@ //! `comline.toml`: the consumer's code-generation config, checked the way -//! `comline generate` reads it. +//! `comline generation` reads it. //! //! The file's shape comes from `comline_codegen::config` - its types, and the //! JSON Schema derived from them - so every key, type and enum value here is @@ -42,7 +42,7 @@ pub const WRONG_TYPE: &str = "comline-toml::wrong-type"; pub const BAD_VALUE: &str = "comline-toml::bad-value"; /// A key that moved out of `comline.toml`. pub const MOVED_KEY: &str = "comline-toml::moved-key"; -/// Anything else `comline generate` refuses in the file's shape. +/// Anything else `comline generation` refuses in the file's shape. pub const INVALID: &str = "comline-toml::invalid"; /// A language `config.idp` doesn't declare. pub const UNDECLARED_LANGUAGE: &str = "comline-toml::undeclared-language"; @@ -180,7 +180,7 @@ impl Context { } if complete { // As core's compiler freezes them, and each framing judged by - // its declaration's frozen facts, as `comline generate` does. + // its declaration's frozen facts, as `comline generation` does. let mut units: Vec<&mut [comline_core::schema::ir::frozen::unit::FrozenUnit]> = schemas .iter_mut() .map(|(_, units)| units.as_mut_slice()) @@ -1118,7 +1118,7 @@ fn semantic(analysis: &mut Analysis, context: &Context) { .filter(|e| e.path == ["generate", "only"]) .filter_map(|e| e.text.clone()) .collect(); - // (language, block) for every target `comline generate` would build. + // (language, block) for every target `comline generation` would build. let mut targets: Vec<(String, Option)> = Vec::new(); let block_language = |i: usize| { analysis @@ -1540,7 +1540,7 @@ mod tests { use crate::analysis::source::SourceFile; // A dependency declares `com.acme.lines@1`, its profile beside its // config.idp: whether it writes JSON is that profile's `payload`, - // frozen on the declaration, as `comline generate` reads it. + // frozen on the declaration, as `comline generation` reads it. let used = |payload: Option<&str>| { let root = std::env::temp_dir().join(format!( "comline-lsp-framing-facts-{}-{}", @@ -1599,7 +1599,7 @@ encodings = { assert!(!opaque.contains("json@1"), "{opaque:?}"); // A profile the editor can't read states nothing. assert!(!used(None).contains("json@1")); - // The same set `comline generate` resolves through generation. + // The same set `comline generation` resolves through generation. let mut schemas = vec![( "app".to_string(), IncrementalInterpreter::from_declarations( diff --git a/src/analysis/generation.rs b/src/analysis/generation.rs index 4894372..7d2c4bc 100644 --- a/src/analysis/generation.rs +++ b/src/analysis/generation.rs @@ -89,7 +89,7 @@ pub fn feature_diagnostics( DiagnosticSeverity::WARNING, UNSUPPORTED_FEATURE, format!( - "{} can't be generated for `{target}`{} - `comline generate` refuses this schema for it", + "{} can't be generated for `{target}`{} - `comline generation` refuses this schema for it", u.feature.title(), detail(&declared.language, &s) ), diff --git a/src/analysis/source.rs b/src/analysis/source.rs index cc5372f..5a2ec31 100644 --- a/src/analysis/source.rs +++ b/src/analysis/source.rs @@ -142,7 +142,7 @@ pub struct DeclaredLanguage { } /// Every language `config.idp`'s text declares, read with core's own -/// interpreter, as `comline generate` reads them. Empty when the manifest +/// interpreter, as `comline generation` reads them. Empty when the manifest /// doesn't parse (mid-edit) or doesn't interpret. /// The edition `config.idp` names (core#102), as core reads it: the newest /// when the manifest names none it knows or doesn't parse - `config.idp`'s diff --git a/src/handlers/comline_toml.rs b/src/handlers/comline_toml.rs index 3797950..a88b352 100644 --- a/src/handlers/comline_toml.rs +++ b/src/handlers/comline_toml.rs @@ -317,13 +317,13 @@ pub fn code_actions( } /// "Check generator" on `generator = ""`: would run its `Describe`, -/// sandboxed as `comline generate` runs a `.wasm`. The language server +/// sandboxed as `comline generation` runs a `.wasm`. The language server /// doesn't embed that sandbox (wasmtime), and never runs a native /// generator, so the action is offered disabled, saying why. pub fn check_generator(written: &str) -> CodeAction { let reason = if written.ends_with(".wasm") { "not available in the editor yet: the language server doesn't embed the wasm sandbox. Run \ - `comline generate`, which describes it sandboxed" + `comline generation`, which describes it sandboxed" .to_string() } else { "only a `.wasm` generator can be checked, sandboxed - the editor never runs a native generator".to_string()