Skip to content

!include <dir> causes a DSL parser exception #135

@okamiraner

Description

@okamiraner

Question

Hello

Documentation says that I can use !include for including all .dsl files inside the directory. In fact, when trying to export a workspace, I get the following exception randomly:

com.structurizr.dsl.StructurizrDslParserException: Input length = 1 at line 3: !include model
	at com.structurizr.dsl.StructurizrDslParser.parse(StructurizrDslParser.java:901)
	at com.structurizr.dsl.StructurizrDslParser.parse(StructurizrDslParser.java:128)
	at com.structurizr.cli.export.ExportCommand.run(ExportCommand.java:131)
	at com.structurizr.cli.StructurizrCliApplication.run(StructurizrCliApplication.java:77)
	at com.structurizr.cli.StructurizrCliApplication.main(StructurizrCliApplication.java:112)

Besides, including a single file works 100% of the time, but in breaks he whole point of a modular workspace adding excessive references that duplicate the folder content.

Its is hard to identify the problem, since the behaviour changes in different runs with the same files.

My directory tree:

├── model
│   ├── person.dsl
│   └── workspace.dsl
├── view
│   └── workspace.dsl
└── workspace.dsl

and the root file:

workspace {
	model {
		!include model
	}

	views {
		!include view
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions