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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,21 @@ four `rules.*` and `verify.lifecycle.unreachable` settings, held to `fixtures/ru
ejected at an earlier version calls (each emitter's `write`, `BODY`, `body(wire)`,
`KotlinNaming.packageHeader`) is kept.

- **The Kotlin Exposed tier writes through `KotlinWriter`** (ADR-0063): the Exposed table
generator (the `<Entity>Table` object and its seven per-package support files: instant with
time zone, inet and uri, duration, int-backed enum array, portable decimal and uuid, uuid string
and the jsonb mapper), the relation helpers, the repository base and the extract mirror. None of
them imports KotlinPoet any more; they read the type mapper's KotlinPoet types by qualified name
until W-KT-4 retires it. **Their output changes in layout only:** imports in one sorted group,
no blank line at the start of a class or companion body, no blank line at the end of a support
file, a one-property extract mirror on one line, a KDoc too long for one line written as a block,
and a blank line after the extract mirror's header comment. `KotlinWriter` now imports a
root-package name (one with no dot) into a file in a named package, as the generators it
replaced did; two new `kotlin` writer cases pin it. The support files' text builders
(`instantTzSupportBlock`, `inetUriSupportFileImports` and the rest) became writer functions
(`writeInstantTzSupport` and its siblings); an owned copy ejected at an earlier version carries
its own and still compiles (`EjectedAtBaseGeneratorsCompatTest`).

- **Python publishes a shared model (FR-023).** A `shared-model` generator, wired in
`metaobjects.config.yaml` like any other (`metaobjects gen --list` names its options), writes
`<name>.metaobjects.json` and `metaobjects.pkg.json` for a consumer's `deps sync`: `name` and
Expand Down
2 changes: 1 addition & 1 deletion docs/CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ regenerate with `ls -d fixtures/<corpus>/*/ | wc -l` for directory-shaped corpor
| [`fixtures/codegen-skip-conformance/`](../fixtures/codegen-skip-conformance/) (when `gen` may skip and what a local `verify --codegen` may answer, ADR-0064) | one case table in `cases.json`, plus the manifest layout vectors in `manifests.json` (ADR-0064 Amendment 1) | ✓ | ✓ | ✓ (through the Java runner) | ✓ | ✓ | ✓ (every case but the three-way merge one) |
| [`fixtures/codegen-noop/`](../fixtures/codegen-noop/) (vocabulary with no lowering yet: FR-044 reporting, what is lowered and what stays inert; ADR-0066 business rules, inert everywhere) | 2 model pairs (`reporting/` and `rules/`, each `with` vs `without`) | ✓ (codegen + migrate) | ✓ | ✓ | ✓ | ✓ | `rules/` (the layer generators lower it; the flat ones stay inert) |
| [`fixtures/cube-model/`](../fixtures/cube-model/) (FR-044 Plan 4 — the `cube-model` generator's golden Cube files, plus the canonical model's golden) | 46 cases (36 trees + 10 errors) + 1 canonical golden | ✓ (the exporter is TypeScript-only, spec R6; its `cube` lane also loads the files into a real Cube) | — | — | — | — | — |
| [`fixtures/writer-conformance/`](../fixtures/writer-conformance/) (ADR-0063 — the code writer generators write through) | 86 cases (31 core + 10 TypeScript + 9 Java + 10 Kotlin + 6 C# + 12 Python + 8 Rust) | ✓ (the first writer; core and TypeScript dialect) | ✓ (core and Java dialect; `JavaWriter` in `codegen-base`) | ✓ (core and Kotlin dialect; `KotlinWriter` in `codegen-kotlin`) | ✓ (core and C# dialect) | ✓ (core and Python dialect) | ✓ (core and Rust dialect) |
| [`fixtures/writer-conformance/`](../fixtures/writer-conformance/) (ADR-0063 — the code writer generators write through) | 88 cases (31 core + 10 TypeScript + 9 Java + 12 Kotlin + 6 C# + 12 Python + 8 Rust) | ✓ (the first writer; core and TypeScript dialect) | ✓ (core and Java dialect; `JavaWriter` in `codegen-base`) | ✓ (core and Kotlin dialect; `KotlinWriter` in `codegen-kotlin`) | ✓ (core and C# dialect) | ✓ (core and Python dialect) | ✓ (core and Rust dialect) |
| [`fixtures/contract-conformance/`](../fixtures/contract-conformance/) (FR-022 — the `contract-schema` and `openapi` generators' golden trees and refusals) | 22 cases (17 trees + 5 errors) | ✓ (one neutral engine, ADR-0034 Amendment 10; the generated API lanes also hold real traffic to the documents) | — | — | — | — | — |
| [`fixtures/explorer-conformance/`](../fixtures/explorer-conformance/) (the `explorer.json` data spine: `meta export --effective` + `meta verify --format json` + the generated-file manifest in, one explorer document out) | 1 case (`shop`) | ✓ (the builder is TypeScript, and reads only port-neutral inputs) | — | — | — | — | — |

Expand Down
2 changes: 1 addition & 1 deletion docs/ports/kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classes.

Two modules:

- **`metaobjects-codegen-kotlin`** — 16 KotlinPoet-based generators.
- **`metaobjects-codegen-kotlin`** — the generators; most lay their output out through `KotlinWriter` (ADR-0063), and the layout ratchet's allowlist names the ones still on KotlinPoet.
- **`metaobjects-metadata-ktx`** — thin Kotlin facade over the Java loader + render
engine for idiomatic Kotlin runtime use.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"description": "A file in the root package does not import a root-package name (one with no dot): Kotlin sees it unqualified from another root-package file.",
"dialect": "kotlin",
"ops": [
[
"use",
"RootTable"
],
[
"line",
"val t = RootTable"
]
],
"expected": [
"val t = RootTable"
]
}
25 changes: 25 additions & 0 deletions fixtures/writer-conformance/cases/kotlin-imports-root-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"description": "A name with no dot is in the root package: a file in a named package imports it, a file in the root package does not.",
"dialect": "kotlin",
"ops": [
[
"use",
"RootTable"
],
[
"package",
"com.acme"
],
[
"line",
"val t = RootTable"
]
],
"expected": [
"package com.acme",
"",
"import RootTable",
"",
"val t = RootTable"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import org.junit.jupiter.api.Assumptions.assumeTrue
* Issue #390 acceptance criterion: "the emitted custom column types round-trip through a real
* JDBC read under 1.x." `Exposed1xCodegenCompileTest` proves the full fitness corpus COMPILES
* against Exposed 1.3.x; this test proves the hand-rolled `Meta*ColumnType` support classes
* ([KotlinExposedTableGenerator]'s `instantTzSupportBlock` / `inetUriSupportBlock` /
* `uuidStringSupportBlock`) actually read back correctly against a real Postgres:
* ([KotlinExposedTableGenerator]'s `writeInstantTzSupport` / `writeInetUriSupport` /
* `writeUuidStringSupport`) actually read back correctly against a real Postgres:
*
* - `MetaInstantWithTimeZoneColumnType` (a `field.timestamp`, default/non-`@localTime`),
* - `MetaUriColumnType` (`field.uri`),
Expand Down
Loading
Loading