structurizr / cli

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

Inconsistent export behaviour #27

Closed miaucl closed 3 years ago

miaucl commented 3 years ago

I was trying to use the structurizr-cli to convert my .dsl file into a PlantUML diagram using the export command. When I use following command

./structurizr export -w c4model.dsl -format plantuml/c4plantuml

I get following error: com.structurizr.dsl.StructurizrDslParserException: Unexpected tokens at line 1: !constant … while executing the same command with a different format works fine:

./structurizr export -w c4model.dsl -format json

Now I wonder why there is are different behaviours for different export formats, as the docs of the .dsl format do not specify such behaviour or say which command is usable for what format.

I am using version v1.8.1, but on version v1.6.0 I could reproduce it, too.

Most notably I stumbled across following lines in my .dsl file which will throw errors:

  1. constants
    !constant ORGANISATION_NAME "MyOrganisation"
  2. include tags by expression
    container software "UserAccess" "Services accessible for users" {
      include User
      include element.tag==userAccess # <== This line does not work, while the previous is no problem
      autoLayout
    }

I am not sure whether this is the correct place to talk about that or maybe I overlooked some documentation regarding this behaviour, anyway, thank you for clarification.

simonbrowndotje commented 3 years ago

Some features may not yet be available via the CLI; the Structurizr DSL demo page should have the latest version though.

miaucl commented 3 years ago

Yes, I saw that on the demo page it was working. But when I want to have the PlantUML .puml files, would I need to push to the cloud and then export from there to make use of the most recent version?

Or can I expect it to be available in the cli soon?

simonbrowndotje commented 3 years ago

Or can I expect it to be available in the cli soon?

Yes ... likely in the next 7-10 days.