It looks like the parser does a single pass through the DSL file, and validates references as it goes.
So, this is valid:
workspace {
model {
a = softwareSystem "A"
b = softwareSystem "B"
a -> b
}
}
but this is not:
workspace {
model {
a = softwareSystem "A"
a -> b
b = softwareSystem "B"
}
}
This is the error message from structurizr-cli validate:
The destination element "b" does not exist at line 4 of /myprojects/structurizr-java/structurizr-dsl/src/test/resources/dsl/relationship-ref-before-target.dsl: a -> b
Not the end of the world, but I've several times wished I could define a relationship in or around a source system (system "A"), rather than having to define it way down in the file after the target system (system "B").
Does that sound like something you'd be interested in supporting?
Priority
I have no budget and there's no rush, please add this feature for free
Description
It looks like the parser does a single pass through the DSL file, and validates references as it goes.
So, this is valid:
but this is not:
This is the error message from
structurizr-cli validate
:Not the end of the world, but I've several times wished I could define a relationship in or around a source system (system "A"), rather than having to define it way down in the file after the target system (system "B").
Does that sound like something you'd be interested in supporting?
Priority
I have no budget and there's no rush, please add this feature for free
More information
No response