Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken.

- **TypeScript** — `codegen-ts` (Vite-style plugins; Drizzle, Zod, Fastify) + `runtime-ts` + `migrate-ts` + the universal web client packages (`runtime-web`, `react`, `tanstack`).
- **C#** — `MetaObjects` (loader + canonical serializer + conformance) + `MetaObjects.Render` (Mustache + payload-VO + `verify`) + `MetaObjects.Codegen` (EF Core entities + `AppDbContext` + CRUD minimal-API routes). Schema migrations run in EF Core Migrations or the Node `meta migrate` reference helper (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.
- **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 run in the project's own tool or the reference migration helper** (`@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).
- **Java** — `metadata` + `omdb` + `om` + `core-spring` + `metadata-ktx` (Kotlin facade) + `codegen-spring` (Spring controllers + DTOs + repositories + filter allowlists + payload records + output parsers) + `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 run in the project's own tool or the reference migration helper** (`@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).
- **Python** — `metaobjects` (loader + canonical serializer + conformance + render + verify + codegen) + an `ObjectManager` runtime layer. The `migrate` module was removed (migrations run in the project's own tool or the Node `meta migrate` reference helper, 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.
- **Kotlin** — `codegen-kotlin` (laid out by `KotlinWriter`, ADR-0063, on the 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.

Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ As of 2026-10-28, every registry package has a single owner, the creator.
| Registry | Packages | Owner today | How it is published |
|---|---|---|---|
| npm | The 13 `@metaobjectsdev/*` packages: `cli`, `codegen-ts`, `codegen-ts-react`, `codegen-ts-tanstack`, `docs-site`, `metadata`, `migrate-ts`, `react`, `render`, `runtime-ts`, `runtime-web`, `sdk`, `tanstack` | npm user `dougmealing`, the only owner of each package, in the `metaobjectsdev` npm organization | Locally, by the release script ([docs/RELEASING.md](docs/RELEASING.md)) |
| Maven Central | The `com.metaobjects` namespace: the `metaobjects` parent POM and 14 modules (`metaobjects-metadata`, `-codegen-base`, `-codegen-mustache`, `-codegen-spring`, `-codegen-kotlin`, `-codegen-plantuml`, `-render`, `-metadata-ktx`, `-maven-plugin`, `-core-spring`, `-spring-boot-starter`, `-om`, `-omdb`, `-omdb-ktx`) | The creator's Sonatype Central Portal account, which holds the verified namespace; artifacts are signed with the creator's GPG key | Locally, with `mvn deploy` |
| Maven Central | The `com.metaobjects` namespace: the `metaobjects` parent POM and 13 modules (`metaobjects-metadata`, `-codegen-base`, `-codegen-spring`, `-codegen-kotlin`, `-codegen-plantuml`, `-render`, `-metadata-ktx`, `-maven-plugin`, `-core-spring`, `-spring-boot-starter`, `-om`, `-omdb`, `-omdb-ktx`) | The creator's Sonatype Central Portal account, which holds the verified namespace; artifacts are signed with the creator's GPG key | Locally, with `mvn deploy` |
| NuGet | `MetaObjects`, `MetaObjects.Render`, `MetaObjects.Codegen`, `MetaObjects.Cli` | nuget.org organization `metaobjects`, administered by the creator | Trusted Publishing from `.github/workflows/publish-csharp.yml` |
| PyPI | `metaobjects` | PyPI user `dougmealing` (Owner) | Locally or from `.github/workflows/publish-python.yml` with an API token |

Expand Down
42 changes: 42 additions & 0 deletions changelog.d/java-entity-writer-mustache-removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
- **Java: the `entity` generator writes through the Java code writer, and the `mustache`
generator is removed** (ADR-0063). `JavaObjectCodeGenerator`'s four writers
(`BaseObjectCodeWriter`, `JavaCodeWriter`, `PojoAwareCodeWriter`, `ValueObjectCodeWriter`) now
write lines and blocks on `JavaWriter` instead of printing through an indentor. The output
changes in layout only: no trailing whitespace, no blank line straight after a class opens or
before it closes, and a one-sentence Javadoc fits on one line. Checked against a capture of
the interface, `pojoAware` and `valueObject` flavors over the fitness corpus: identical with
whitespace ignored, apart from that one Javadoc. The layout ratchet gains an `indented-print`
rule (`println(true, ...)`), the call that typed indentation without a literal and let this
family go unseen. Generated-output change — regenerate to pick it up; three-way merge
preserves hand edits.

The deprecated `mustache` generator (`MustacheTemplateGenerator`) and its module
`metaobjects-codegen-mustache` are removed; `template` (`TemplateScopeGenerator`, in
`codegen-base`) replaces them. A pom that still names `MustacheTemplateGenerator` fails the build
with a `ClassNotFoundException`.

Upgrading: replace a `MustacheTemplateGenerator` `<generator>` with
`com.metaobjects.generator.template.TemplateScopeGenerator` and its args `templatesDir`,
`template`, `scope` and `outputPattern` (docs/features/codegen-concepts.md), and drop any
`metaobjects-codegen-mustache` dependency. An owned copy of the `entity` writers (from
`mvn metaobjects:eject -Dnames=entity`) keeps working as it is; to take the new layout,
re-eject, or write through `out()` (a `CodeWriter`; `java()` in `JavaCodeWriter`) instead of
`println`/`inc`/`dec`, which the entity writers no longer have.

The deprecated shims in the documentation generators are removed too: the attribute-name
constants and `register*Attributes` methods on `MetaDataAIDocumentationGenerator` and
`MetaDataFileJsonSchemaGenerator` (use the same names on `CodeGenMetaDataProvider`),
`MetaDataFileSchemaWriter.addConstraintFile` (a no-op since registry-based discovery), and the
old `SingleHtmlDirectGeneratorBase.writeHtml(MetaDataHtmlDocumentationWriter)` hook (override
`writeHtml(HtmlDirectWriter)`).

So are the 1.0.x forwarding shims in `codegen-spring`. The static field and annotation helpers
on `SpringDtoGenerator` (`settableFields`, `scalarFields`, `dtoComponentFields`,
`valueObjectJsonbFields`, `valueObjectMapFields`, `isValueObjectJsonbField`, `componentType`,
`isRequired`, `originGuaranteedNonNull`, `validationAnnotations`, `sizeAnnotation`, `attrBool`,
`attrInt`, `hasValidator`, `escapeJavaString`) and on `SpringRepositoryGenerator`
(`m2mFinderName`, `m2mFinderNameForSubtype`, `targetSubtypeParam`) are gone: call the same name
on `SpringGeneratorSupport`, and `SpringGeneratorSupport.repositoryAppliesTo` for
`SpringRepositoryGenerator.appliesTo`. The `AutoSetSupport` selectors `stampFields`,
`onUpdateFields`, `hasAutoSetFields` and `hasOnUpdateFields` move the same way, to
`SpringGeneratorSupport`.
55 changes: 55 additions & 0 deletions changelog.d/python-codegen-writer-no-ruff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
- **Python: every generator writes through the code writer, and codegen no longer runs `ruff`**
(ADR-0063). The router and the last nine emitters (extractor, output parser, trace helper,
render helper, names, requirement tests, API docs and the extract delegate and schema emitters)
now lay out their files with `PyWriter`, so generated bytes no longer depend on whether `ruff` is
installed or on its version. The output changes in layout only: a line longer than 88 columns
breaks its last bracketed list, and imports are grouped `__future__`, absolute, then relative,
each in code-point order. Checked against a capture of every emitted file: same syntax tree,
comments and docstrings. One fix rides along: an unresolved `@objectRef` mapper argument used
to put its comma inside the trailing comment, which was a syntax error; it is now
`x=None, # unresolved @objectRef`. Generated-output change — regenerate to pick it up;
three-way merge preserves hand edits.

Upgrading: no reference generator calls `metaobjects.codegen.format.ruff_format` any more. It
stays exported, so an owned copy ejected from an earlier release that imports it still loads and
still formats its own output. These subclass hooks now take the writer `w` first and write,
instead of returning lines or a string:
`RouterGenerator._emit_repository_protocol(self, w, repo_class, m2m, pk_type)`,
`_emit_reverse_finders(self, w, entity)`, `_emit_route_handler(self, w, name, ...)`,
`_emit_m2m_route(self, w, d, ...)`, `_emit_tph_m2m_route(self, w, d, ...)`,
`_emit_tph_list_body(self, w, subtype_expr, ...)`,
`_emit_readonly_reject_handlers(self, w, snake, ...)`, `_report_list_with_export(self, w, ...)`
and `ExtractorGenerator._emit_mapper(self, w, vo, root)`. In `_emit_route_handler` the
`create_autoset`, `update_autoset`, `frozen_strip` and `denied_strip` arguments are now
`BodyStep` callables that write into `w`, not line lists. `RenderHelperGenerator._emit_document`
and `_emit_email` take `header` as `list[str]` instead of `str`. In the runtime emitters that
eject hands over, `extract_delegate_emitter.nested_mirror_dataclasses`, `nested_mappers` and
`delegate_helpers` are now `write_nested_mirror_dataclasses(w, vo, root)`,
`write_nested_mappers(w, vo, root)` and `write_delegate_helpers(w, used)`, and
`extract_schema_emitter.mirror_dataclass` and `mirror_initializer` are removed (the
mirror dataclasses come from `write_nested_mirror_dataclasses`; the new `schema_piece` is the
schema descriptor that `trace-helper` writes). Eject never overwrites an existing
`codegen/runtime/` copy, even with `--force`, so delete the old copy before you re-eject.
`output-parser` and `extractor` share `codegen/runtime/extract_delegate_emitter.py`: delete
it, then re-eject every one of the two that you own. For `trace-helper`, delete
`codegen/runtime/extract_schema_emitter.py`, then re-eject `trace-helper`. `ruff` stays a
dev dependency for the compile gate's `ruff check` lint only.

Removed: the deprecated module aliases added in 1.1.0. An import of an old path now fails with
`ImportError` (or its subclass `ModuleNotFoundError`, depending on the import form); import
from the new path instead:
`metaobjects.codegen.extract_delegate_emitter` is `metaobjects.codegen.runtime.extract_delegate_emitter`,
`metaobjects.codegen.extract_schema_emitter` is `metaobjects.codegen.runtime.extract_schema_emitter`,
`metaobjects.codegen.fr010_field_mapping` is `metaobjects.codegen.runtime.fr010_field_mapping`,
`metaobjects.codegen.output_format_spec_emitter` is `metaobjects.codegen.runtime.output_format_spec_emitter`,
`metaobjects.codegen.generators.fr019_shared_enum` is `metaobjects.codegen.runtime.fr019_shared_enum`,
`metaobjects.codegen.generators.m2m_codegen` is `metaobjects.codegen.runtime.m2m_codegen`,
`metaobjects.apidocs.api_model` is `metaobjects.codegen.runtime.api_docs_model`,
`metaobjects.apidocs.builder` is `metaobjects.codegen.runtime.api_docs_builder`,
`metaobjects.apidocs.renderer` is `metaobjects.codegen.runtime.api_docs_renderer` and
`metaobjects.apidocs.paths` is `metaobjects.codegen.runtime.api_docs_paths`. The
`metaobjects.apidocs` package and `metaobjects.apidocs.naming` stay. An owned copy ejected
before 1.1.0 that still imports an old path needs its imports changed, or re-eject it. For
`output-parser`, changing the imports is not enough, because that copy calls the removed
`nested_mirror_dataclasses`, `nested_mappers` and `delegate_helpers`: re-eject it, or move it to
`write_nested_mirror_dataclasses`, `write_nested_mappers` and `write_delegate_helpers`.
9 changes: 4 additions & 5 deletions docs/RELEASING-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ references must be refreshed.

## What gets published

The reactor (`server/java/pom.xml`) lists 14 publishable modules; with the parent
POM (`com.metaobjects:metaobjects`) that is 15 artifacts on Central. As of
The reactor (`server/java/pom.xml`) lists 13 publishable modules; with the parent
POM (`com.metaobjects:metaobjects`) that is 14 artifacts on Central. As of
7.0.0 the reactor explicitly **excludes** `archetype` and `examples` — they
were aggregator entries but not consumer-facing dependencies, and keeping
them in the reactor required `-pl` exclusions that didn't transitively
Expand All @@ -29,7 +29,6 @@ the reactor and not deployed.
|---|---|
| `metadata/` | `metaobjects-metadata` |
| `codegen-base/` | `metaobjects-codegen-base` |
| `codegen-mustache/` | `metaobjects-codegen-mustache` |
| `codegen-spring/` | `metaobjects-codegen-spring` |
| `codegen-kotlin/` | `metaobjects-codegen-kotlin` |
| `codegen-plantuml/` | `metaobjects-codegen-plantuml` |
Expand Down Expand Up @@ -175,7 +174,7 @@ git push origin main
cd server/java && mvn clean verify
```

All 14 publishable modules should reach SUCCESS with the full test suite green. Use `verify`, not
All 13 publishable modules should reach SUCCESS with the full test suite green. Use `verify`, not
`install`: a reactor build needs no installed artifacts, and installing writes this version into the
shared `~/.m2`, where every other checkout building the same number then resolves it.

Expand All @@ -201,7 +200,7 @@ is published, which is the safe failure mode.
What the command does:

- Activates the `release` profile (triggered by `-DperformRelease=true`).
- Includes all 14 reactor modules (no `-pl` exclusions needed since
- Includes all 13 reactor modules (no `-pl` exclusions needed since
archetype/examples are out of `<modules>`).
- Generates javadoc + sources jars for each module. **Kotlin modules use
`dokka-maven-plugin` to produce javadoc** (added to each Kotlin pom
Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ registry. A crate name is reserved only by publishing it, and the CLI's package

# Releasing the Java/Kotlin modules to Maven Central

The 14 `com.metaobjects:*` modules (15 artifacts, counting the parent POM) ship to **Maven Central via the Sonatype Central Portal**,
The 13 `com.metaobjects:*` modules (14 artifacts, counting the parent POM) ship to **Maven Central via the Sonatype Central Portal**,
versioned on its own major line — npm major + 7, so `7.x` while npm was `0.x` and `8.x` from the
1.0 cut (the reactor version in [`server/java/pom.xml`](../server/java/pom.xml)) — in the parent + module poms. Signed with the maintainer's GPG key.

Expand Down
Loading
Loading