You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0affc6a
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cli): one generator list and one gen command for C# and Python (#440)
* feat(csharp,python)!: one generator list per port; the docs commands are removed
ADR-0034 Amendment 9 for C# and Python. Every generator, the api reference
included, is an entry in the port's generator list, and the gen command runs
exactly that list.
C#: the list is codegen/Generators.cs, run by a two-line codegen/Program.cs.
New `dotnet meta init` writes the codegen project; eject writes the three
files when missing. `dotnet meta gen` and `verify --codegen` run the list and
refuse a project without one. `--generators` only narrows declared entries.
ApiDocsGenerator takes OutDir, ApiSubDir, ProjectName and ModelBaseUrl as init
properties; IGenerator.OutDir lets an entry write outside --out, and the drift
gate compares each directory. `dotnet meta docs` prints the removed-command
line; 1.0 docs flags on gen fail before writing.
Python: metaobjects.config.yaml is the list. gen and verify --codegen are
config-only; the positional --out form and --template-spec are not read
(targets gain templateSpec). api-docs is a target entry with a top-level
apiDocs block. `metaobjects docs` and a 1.0 docs block fail with the fixed
lines. Moved-module aliases warn with FutureWarning naming 2.0, and the
owned-router eject test compares lines in order.
Docs, skills, fixture copies, the showcase script and the CHANGELOG follow.
* feat(csharp,python)!: a template spec is declared in the generator list, never discovered
One list means one declaration (ADR-0034 Amendment 9). C#: the owned runner
no longer reads --template-spec or discovers a project-root
template-spec.json; a spec runs as a TemplateSpecGenerator entry in
codegen/Generators.cs (Spec, TemplateRoot, OutDir). A run that finds the
1.0 configuration with no such entry fails before writing, with a fixed
line naming the migration section.
Python already required a target's templateSpec; a leftover
template-spec.json that no target declares now fails gen and verify
--codegen the same way instead of being skipped.
The C# migration section gains the template-spec before and after, and the
port, concepts, own-your-codegen, cli and skill pages follow.
* docs: five-port text for the api-docs note and stale docs-command comments after rebase
* no-mistakes(review): Refuse legacy C# Program.cs; narrow verify drift; requirement-tests OutDir
* no-mistakes(review): Fix narrowed verify, generators-key refusal, C# OutDir and template root
* no-mistakes(review): Treat missing --out as empty tree; fix migration token, changelog
* no-mistakes(review): Add generators: [] to Python templateSpec doc example
* no-mistakes(review): Derive C# names gate from declared list, not narrowing
* no-mistakes(document): Drop removed verify --docs flag; fix CHANGELOG garbled sentence; regen agent-context fixtures
-**C#** — `MetaObjects` (loader + canonical serializer + conformance) + `MetaObjects.Render` (Mustache + payload-VO + `verify`) + `MetaObjects.Codegen` (EF Core entities + `AppDbContext` + CRUD minimal-API routes). Schema migrations are TS-owned (ADR-0015): the C# migrate engine and the `migrate`/`--from-db` CLI surface were removed; the C# CLI is `gen`/`verify` only, packaged as a .NET tool invoked **`dotnet meta`** (not a bare `meta` — that name belongs to the Node schema CLI). EF Core runtime data-access stays per-port.
69
+
-**C#** — `MetaObjects` (loader + canonical serializer + conformance) + `MetaObjects.Render` (Mustache + payload-VO + `verify`) + `MetaObjects.Codegen` (EF Core entities + `AppDbContext` + CRUD minimal-API routes). Schema migrations are TS-owned (ADR-0015): the C# migrate engine and the `migrate`/`--from-db` CLI surface were removed; the C# CLI is codegen (`init`/`gen`/`eject`), `verify` and `fmt` only, packaged as a .NET tool invoked **`dotnet meta`** (not a bare `meta` — that name belongs to the Node schema CLI). EF Core runtime data-access stays per-port.
70
70
- **Java** — `metadata` + `omdb` + `om` + `core-spring` + `metadata-ktx` (Kotlin facade) + `codegen-spring` (Spring controllers + DTOs + repositories + filter allowlists + payload records + output parsers) + `codegen-mustache` + `codegen-plantuml` + `render` + `maven-plugin` (`metaobjects:generate`/`metaobjects:editor` + a `metaobjects:verify` **codegen-drift** goal — distinct from the removed live-DB `metaobjects:verify`; Kotlin generators run through `metaobjects:generate` via the shared SPI). FR-003 (OMDB runtime persistence + binding registry + typed jsonb + Spring-tx + source/origin metamodel) fully shipped, including Plan 4 (engine-debt remediation: atomic mapping cache, JDBC codec registry, `inTransaction` template). **Schema migrations are owned by the TypeScript toolchain** (`@metaobjectsdev/cli migrate`); the Java port's diff-and-converge migration engine and its `metaobjects:migrate` / live-DB-drift `metaobjects:verify` Maven goals were removed, and per ADR-0015 Decision 2 the dev/test runtime auto-create path (`MetaClassDBValidatorService` + the drivers' `createTable`/`createIndex`/`createForeignKey`/`createSequence` DDL) is **also** removed — **OMDB is pure data-access** (CRUD/query/codec/transactions only).
71
71
-**Python** — `metaobjects` (loader + canonical serializer + conformance + render + verify + codegen) + an `ObjectManager` runtime layer. The `migrate` module was removed (schema is TS-owned, ADR-0015); Python is pure data-access (codegen + ObjectManager runtime), with a **`metaobjects` console-script** (`gen`/`verify` codegen — no `migrate`). All five conformance corpora green.
72
72
-**Kotlin** — `codegen-kotlin` (KotlinPoet on JVM): entity + Exposed table + Spring controller + payload + relations + filter allowlist + validator + stored-proc + output-parser generators. `integration-tests-kotlin` runs the persistence-conformance corpus through Exposed against Testcontainers Postgres.
0 commit comments