Skip to content

feat: get codegen from comline-codelib-gen, not comline-core - #16

Merged
Kinflou merged 1 commit into
mainfrom
chore/codegen-from-generation
Aug 30, 2026
Merged

feat: get codegen from comline-codelib-gen, not comline-core#16
Kinflou merged 1 commit into
mainfrom
chore/codegen-from-generation

Conversation

@Kinflou

@Kinflou Kinflou commented Aug 30, 2026

Copy link
Copy Markdown
Member

De-rot G1b — the second half of moving code generation out of core. Pairs with core#41 (removes codelib_gen from core).

The CLI is the composition root: compile schemas via comline-core, pick a generator via comline-codelib-gen.

Changes

  • Cargo.toml — add comline-codelib-gen (generation git rev f17c210). Move comline-core from crates.io 0.1.0 to the same core git rev (d8bc708) that comline-codelib-gen pins, so the dependency tree has a single comline-core (a registry + git pair at the same version would be two incompatible crates → FrozenUnit type mismatch).
  • generate.rs / clean.rscomline_core::codelib_gen::find_generatorcomline_codelib_gen::code_gen::find_generator.

Notes

  • generation's find_generator is version-exact (only "1.70.0" is registered) where core's ignored the version. Every fixture and comline new's scaffolding uses rust#1.70.0, so no test changes — but a rust#1.71.0 target would now say "no generator" until generation adds keys.
  • Interim git deps until comline-core / comline-codelib-gen cut releases. .cargo/config.toml (gitignored) already documents the local-[patch] escape hatch for comline-core.
  • cargo test: 36 passed.

Design: design/generation.md → G1b.

Code generation moved to ComlineProject/generation (de-rot G1b). The CLI
is the composition root: it compiles schemas via comline-core and picks
a generator via comline-codelib-gen.

- Cargo.toml: add comline-codelib-gen (generation git rev f17c210);
  move comline-core from crates.io 0.1.0 to the same core git rev
  (d8bc708) comline-codelib-gen uses, so the tree has one comline-core.
- generate.rs / clean.rs: comline_core::codelib_gen::find_generator ->
  comline_codelib_gen::code_gen::find_generator.

Behaviour note: generation's find_generator is version-exact (only
"1.70.0" is registered) where core's ignored the version. All fixtures
and `comline new` scaffolding use rust#1.70.0, so no test changes.

cargo test: 36 passed.
@Kinflou
Kinflou merged commit eb69a60 into main Aug 30, 2026
2 checks passed
@Kinflou
Kinflou deleted the chore/codegen-from-generation branch August 30, 2026 23:52
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