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 d199122
Browse filesBrowse the repository at this point in the historyBrowse files
- **Every container you start, you remove.** Use `docker run --rm`, Testcontainers with Ryuk enabled,
515
+
or explicit teardown in a `finally`/`trap`. Never leave a hand-started database running after your
516
+
task. A database you mean to keep gets the label `dev.keep=true`.
517
+
- **Generators and tools never rewrite a file whose bytes did not change**, write any manifest once per
518
+
run (not once per file), and verify drift in memory rather than by rendering everything to a temp
519
+
directory.
520
+
- **Run the narrowest tests that prove the change** while iterating (one module, the affected test
521
+
classes); run the full suite once, before the PR.
522
+
- **No background processes outlive the task.** Kill test watchers, dev servers and sandboxes you
523
+
started before you finish.
524
+
525
+
Project specifics: test databases start in the TypeScript `integration-tests` package (`src/postgres-container.ts`, `src/mysql-container.ts`, `src/cube-container.ts`, sharing `src/throwaway.ts`), the Python `tests/integration/` launchers (`postgres_container.py`, `mysql_container.py`, `throwaway.py`), the C# `MetaObjects.IntegrationTests/Runner/PostgresContainer.cs`, the Java and Kotlin Testcontainers `PostgresContainer` classes under `server/java/integration-tests*`, and the services and sidecars in `.github/workflows/integration-tests.yml` and `local-ci.yml`.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+38-4Lines changed: 38 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -307,6 +307,16 @@ loaded before stops loading. This vocabulary ships in 1.3.0 with `metamodelVersi
307
307
`Cannot find module './dprint-node.linux-x64-gnu.node'` on every command that loads the
308
308
codegen engine, `meta migrate` and `meta verify --db` included. Those schema commands, the
309
309
binary's documented scope, now run; `meta gen` is still not supported inside the binary.
310
+
- **Test databases stay off the drives.** Every Docker-backed database launcher in every port
311
+
(the TypeScript `integration-tests` Postgres, MySQL and Cube containers; the Python MySQL and
312
+
Postgres launchers; the C# MySQL and Postgres runners; the Java and Kotlin Testcontainers
313
+
classes; the services and sidecars in the integration-test and local-CI workflows and
314
+
`scripts/ci-local.sh`) mounts a 2 GiB tmpfs at the image's `VOLUME` path, and Postgres runs
315
+
with `fsync`, `synchronous_commit` and `full_page_writes` off. Each container is removed when
316
+
its run ends: by `--rm`, by Ryuk when a killed process never reaches its own cleanup, and by an
317
+
exit or SIGTERM handler that also removes anonymous volumes. The Stryker mutation gate for the
318
+
metadata package builds its sandbox under `$DEV_SCRATCH` (the system temp directory when unset)
319
+
and stops its test runners with it. Contributor steps are in [CONTRIBUTING.md](CONTRIBUTING.md).
310
320
311
321
### Deprecated
312
322
@@ -322,10 +332,34 @@ loaded before stops loading. This vocabulary ships in 1.3.0 with `metamodelVersi
322
332
the per-type name index instead of a scan of the root. Twenty copies of the canonical
323
333
conformance model (1,160 objects) load in about 2 seconds of CPU, and `LargeModelLoadTest`
324
334
holds that to a budget. Java and Kotlin.
325
-
- **Python `metaobjects gen` lists only the files it changed.** It printed every file it emitted
326
-
and counted them all as written, unchanged ones included. It now lists the files it wrote and
327
-
counts the rest as unchanged (`wrote 2 file(s), 40 unchanged, across 1 target(s).`), as the
328
-
other ports report.
335
+
- **`gen <Entity>` no longer shrinks the files rendered from the whole model.** Narrowing a run
336
+
to some entities (`meta gen Post`, Python `metaobjects gen --entities Post`) handed every
337
+
generator only the named entities, so a whole-model file (the TypeScript barrel and Cube
338
+
model, Python's shared enums module, duration codec and report writers, and the object index
339
+
Python's entity and route generators resolve relations through) was rendered from just them. A narrowed run now writes only the named entities' own files,
340
+
and every whole-model file it writes is byte-identical to a full run's. A generator sees the
341
+
whole model in `ctx.entities` and the narrowing as `ctx.selected`; `perEntity` (`per_entity`)
342
+
applies it. A Python target's declared `entities` still bounds that target's model. The C# and
343
+
Maven entity selection added in this release follows the same rule. Two consequences to expect: a narrowed run
344
+
checks the whole model as a full run does (a sourced object with no `dialect`, colliding
345
+
collection names), because the files it writes are rendered from it; and an owned generator
346
+
that writes one file per object by looping over `ctx.entities` itself, instead of through
347
+
`perEntity`, now sees every object, so it should set each file's `sourceNode` (the runner
348
+
then drops the unnamed objects' files) or apply `ctx.selected`.
349
+
- **`gen` writes `.hashes.json` once per run, and not at all when nothing changed.** TypeScript,
350
+
Python and C# re-read and re-wrote the whole manifest after every generated file, so a run of
351
+
N files wrote it N times; they now hold it in memory for the run and write it once, as Java
352
+
already did. Python's `metaobjects gen` output changes, which matters to a script that parses it:
353
+
it now lists only the files it wrote, and its summary line counts the files it left as they
354
+
were (unchanged or skipped) separately instead of reporting them as written. A run that
355
+
fails still records the files it wrote before failing, and a failed manifest write then no
356
+
longer hides the error that stopped the run.
357
+
- **`meta gen` loads the metadata once.** The unknown-attribute warning re-loaded the project
358
+
strictly on every run; it now reuses the generation load and parses strictly again only when
359
+
the lenient load reported an unknown bare key. `meta gen` also no longer imports a database
360
+
driver: the migration advice it prints reads `@metaobjectsdev/migrate-ts/offline`, a new
361
+
subpath with the schema builder and diff and none of the introspection or apply code.
362
+
329
363
- **A projection view keeps the columns a reverse `@via` hop feeds.** An origin `@via` that walks
330
364
an `identity.reference` backwards (`Project.timeEntries`, #560) loaded, but `meta migrate` left
331
365
its `origin.aggregate` / `origin.first` columns out of `CREATE VIEW` without a word. The view
0 commit comments