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 314c36f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(codegen-ts): byte-identical duplicate emissions collapse instead of failing the build (#266)
A root-level abstract field.enum makes EVERY entityFile() instance emit the shared
enums.ts at its target root -- the module is rendered from the whole loaded root,
not from the instance's filtered subset. A config running more than one entityFile()
against one target (the normal way to split a model across generated areas) therefore
died on `Output path collision: enums.ts emitted by both "entity-file" and
"entity-file"` -- an emission colliding with a byte-identical copy of itself.
That made shared enums unusable in any multi-entityFile config, and the workaround
distorted the model: the closed set ends up "owned" by whichever field happened to be
written first, with every other usage inheriting from that field rather than from a
named shared concept.
The runner now keeps the first of two byte-identical emissions at the same path and
moves on. Differing content is STILL a hard error -- there the result would depend on
generator order, which is exactly the ambiguity the guard exists to catch. Existing
single-entityFile output is byte-identical.
Tests: the reported repro end-to-end (two filtered entityFile() instances + a shared
abstract enum in one target, watched failing against the unfixed runner first) plus a
runner unit case; the pre-existing differing-content collision test is unchanged and
still throws. codegen-ts 1035 pass, cli 416 pass, workspace build + typecheck green.
Also documents the Java meta:verify per-unique-outputDir fix (eed4a6b) in CHANGELOG.
0 commit comments