structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
492 stars 75 forks source link

Inconsistent plantuml names #103

Closed dgutson closed 1 year ago

dgutson commented 1 year ago

With the latest version (1.8.4, and I think this is the exporter repo) naming changed completely and broke all my build system. I sometimes use the C4-plantUML exporter, and sometimes the structurizr plantUML (should I distinguish which one in each case? It's quite a lot of work). This is an example of what I get now: image

Trying to get a pattern, seems that dynamic diagrams (structurizr plantUML) preserves the name, whereas C4 lost the names and just gets enumerated. [EDIT] No, this is not correct.

I always explicit a view key.

Also note that these changes are breaking changes when structurizr is used in a build system as we have.

dgutson commented 1 year ago

FYI I just modified the build system to be able to use a fixed structurizr/cli tag rather than latest, and do a controlled and planned upgrade in order to avoid this.

simonbrowndotje commented 1 year ago

The naming of exported files is done by the CLI (ExportCommand.java#L169), and uses the key associated with the view. It looks like you're seeing the side-effect of this bug fix to the DSL parser. If you want to ensure the naming consistency of your exported files, you'll need to make your view keys explicit when you define your views.

i.e.

systemLandscape "mykey" {
...
}

vs

systemLandscape {
...
}