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
meta gen writes a regenerable per-target shadow copy under .metaobjects/<target>/ that meta init's .gitignore doesn't exclude (committed by default) #75
For a multi-target codegen config, meta gen writes generated output to each target's configured outDirand a regenerable shadow copy under .metaobjects/<targetName>/src/generated/. But meta init scaffolds .metaobjects/.gitignore containing only.gen-state/, so this shadow copy is not ignored and gets committed by default.
Repro
meta init (TypeScript). The generated .metaobjects/.gitignore contains just .gen-state/.
Add a second output target whose outDir points outside the project root (e.g. a sibling package, ../shared/src/generated).
Run meta gen.
Observe: generated files land at the configured outDirand at .metaobjects/<targetName>/src/generated/*.ts. The latter shows up as untracked but is not gitignored, so it's trivially committed.
Why it matters
The .metaobjects/<target>/ copy is regenerable: deleting it and re-running meta gen recreates it, and meta gen then reports it unchanged. It is not the canonical output (that lives at the configured outDir).
Because it isn't covered by the meta init gitignore, every multi-target project silently commits a duplicate, regenerable copy of generated code under .metaobjects/.
Expected
The regenerable per-target shadow shouldn't be committed by default — either write it under the already-ignored .gen-state/, or have meta init add the per-target shadow dirs to .metaobjects/.gitignore (METAOBJECTS_GITIGNORE_BODY in cli/src/commands/init.ts).
Correctly-tracked, for contrast
.metaobjects/migrations/ (per-migration up.sql/down.sql + .schema.postgres.json drift baseline) is meant to be tracked — this report is only about the regenerable per-target generated-code shadow under .metaobjects/<target>/.
Environment
@metaobjectsdev/* 0.12.0 (TypeScript), multi-target config with a cross-package target outDir.
Activity
dmealing commentedon Jun 27, 2026
Fixed in #82 (in CI). For #37: branch protection must add the required check
conformance / java-reactor(job renamed).fix(cli): harden meta init scaffold and close the Java CI reactor gate (