Repository navigation
fix(core): use Structurizr DSL identifiers for element ids and patches - #411
Conversation
Finishing Touches
Warning Some tools did not complete. Review the errors below.
|
d3a08ff to
2fa96a9
Compare
[Medium impact] The PR appears safe to merge; no new blocking issues were found. SummaryStructurizr models now expose stable DSL identifiers instead of numeric JSON IDs, and relationship patches use the matching source identifiers.
The previous finding about lost skip reasons is addressed: the caller now keeps and prints them when no patch remains. No new actionable issues were found. Reviews (4) · Last reviewed commit: "fix(core): report skip reasons when no m..." · Reviewed by Greptile |
d547cf5 to
c468291
Compare
- Element ids come from erode.id, then the structurizr.dsl.identifier property the DSL parser writes, then an ASCII slug of the name - Numeric JSON ids stay internal and are never written to DSL - Patches reference DSL identifiers; relationships to elements without one, and new components with invalid ids, are skipped with a reason - Element type comes from the JSON array, not the id depth - Duplicate resolved ids fail the load and name both elements - ADR-003 amendment and an Upgrading note in the Structurizr docs
Callers can pass a skipped array in the patch options; analyze prints the reasons when every relationship was skipped, so users see why, for example that an element needs a DSL identifier.
c468291 to
f82642d
Compare
Stacked on #410.
What changed
erode.id, then thestructurizr.dsl.identifierproperty that the DSL parser writes for every element (structurizr/structurizrStructurizrDslParser.registerIdentifier), then an ASCII slug of the name. UUID identifiers from anonymous elements are ignored."1","5") are only used internally to resolve relationship endpoints. They are never exposed or written to DSL. Before, real exports withouterode.idproduced ids like1.5, and every patch failed validation.people,softwareSystems,containers,components), not guessed from the number of dots.common.schema.ts; derived state reset on every load; references map built once.Behaviour changes (possibly breaking)
ordersinstead of2.3). Users who seterode.idkeep their ids.erode.idto resolve.erode.idand no DSL identifiers gets no relationship patches (skipped with a reason).Review follow-ups
ModelPatchOptions.skipped).Checks
check:ci