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
Two files declaring the same (type, name) at root level under DIFFERENT
packages were silently treated as one node by the TS, C#, and Python
loaders: the merge lookup keyed on bare (type, name) only. Identical
twins merged silently; twins differing in an @attr (e.g. @objectref
pointing at each package's own nested view) failed the load with
ERR_MERGE_CONFLICT. The Java parser is the gold standard here — it
searches root children by "pkg::name" — so a downstream consumer's
metadata that loads fine on the JVM failed in the Node CLI.
Root-level merge lookups now compare the package-qualified identity
(own package, expanded against the file context, else the file-default
package) on both sides — mirroring Java. Nested children stay bare-name
matched: they are scoped by their parent, and packages don't
disambiguate siblings inside a node. Same-package cross-file overlay
merging is unchanged.
New cross-port conformance fixture loader-same-name-distinct-packages
covers both twin shapes (identical bodies + differing @objectref);
expected.json generated by the TS reference implementation, Java passes
it unchanged.
Co-authored-by: Doug Mealing <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
8
8
## [Unreleased]
9
9
10
+
### Fixed
11
+
-**Loader — root-level same-name nodes in different packages were wrongly merged (TS/C#/Python).** Two files declaring the same (type, name) at root level under different packages collapsed into one node: identical twins merged silently, and twins differing in an `@attr` (e.g. each package's `@objectRef` pointing at its own nested view) failed the load with `ERR_MERGE_CONFLICT`. Root-level merge matching now compares the package-qualified identity (own `package` else the file-default package) — mirroring the Java parser, which was already correct. Nested children stay bare-name matched; same-package cross-file overlay merging unchanged. New cross-port conformance fixture `loader-same-name-distinct-packages` (Java passes it unchanged). (#155)
12
+
10
13
## [0.15.3] — 2026-07-03
11
14
12
15
_npm `0.15.3` (full lockstep across all 13 `@metaobjectsdev/*` publish candidates)._
0 commit comments