Skip to content

comline.toml: use comline-codegen's shared config, and point at its schema - #109

Merged
Kinflou merged 1 commit into
mainfrom
config/shared-comline-toml
Oct 31, 2026
Merged

Kinflou merged 1 commit into
mainfrom
config/shared-comline-toml

Conversation

@Kinflou

@Kinflou Kinflou commented Oct 31, 2026

Copy link
Copy Markdown
Member

Step 4 of the core 2ae9986 cascade, and the CLI side of comline.toml editor support (generation#92).

  • Shared config. comline.toml's types, parsing and resolution are now comline_codegen::config, and the moved code is gone from src/gen_config.rs. That file keeps only Destination::dest_for, which renders a target's layout into a path with core's template engine. external::DEFAULT_TIMEOUT is config::DEFAULT_TIMEOUT. Behaviour and error messages are unchanged. The moved unit tests now run in generation.
  • #:schema. comline new's comline.toml starts with #:schema https://comlineproject.github.io/docs/schemas/comline-toml/0.x.json. The scaffold test asserts that line. It's a TOML comment, and the scaffold test still builds and generates from the project.
  • docs/cli.md describes the schema and the #:schema line, and corrects mode to code | lib.
  • Pins:
    • core 2ae9986 (core#148)
    • comline-codegen generation de7ceb4, the same string comline-rust and comline-typescript pin
    • comline-codegen-rust 5346678 (comline-rust#84)
    • comline-codegen-typescript c2096cd (comline-typescript#100)
    • the same in tests/fixtures/generators
  • One test fixture change, from core#148. A framing without conformance vectors now gives up encoding conformance. The dependency-framing tests' acme package therefore ships lines.vectors.json beside its profile, copied from tests/fixtures/conformance_package.

Output check. I ran comline generate with main and with this branch on simple_project, validated_project, chat_project and conformance_package. Each ran under 8 comline.toml variants: default, lib, lib with inline std, custom layout/out/async/validate, only + flattened target, a bad mode, a typo'd key, and default_framing.

  • All generated files, stdout/stderr and exit codes are identical, apart from one line in the Rust output.
  • That line is the comline-runtime rev comment or Cargo.toml dependency (4d6e1c5 → 37082de). It comes from comline-rust#82, already on comline-rust main, which this branch picks up by moving off 0e5c60e.

cargo fmt --check, both clippy configurations and cargo test (13 + 105) pass locally. cargo tree -d shows one copy of each comline crate.

Merge after generation#92, comline-rust#84 and comline-typescript#100.

…chema

comline.toml's types, parsing and resolution moved to
comline_codegen::config (generation de7ceb4), which also generates the
file's JSON Schema. What stays here is rendering a target's layout into a
path, which needs core's template engine. Behaviour and messages are
unchanged.

`comline new`'s comline.toml starts with a #:schema line naming the
schema, which Taplo-based editors read; docs/cli.md says so.

Moves core to 2ae9986 (core#148), and the generators to their branches
on it (comline-rust 5346678, comline-typescript c2096cd). Under core#148's
rule a framing without conformance vectors gives up encoding conformance,
so the dependency-framing tests' `acme` ships its vectors.
@Kinflou
Kinflou merged commit 8d70f0e into main Oct 31, 2026
2 checks passed
@Kinflou
Kinflou deleted the config/shared-comline-toml branch October 31, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant