structurizr / lite

Structurizr Lite
https://docs.structurizr.com/lite
MIT License
226 stars 26 forks source link

Diagrams not rendered when using !includes only #122

Closed yvesaston closed 5 months ago

yvesaston commented 5 months ago

Description

systemContext SystemA SystemAContext {
    include *
}

container SystemA SystemAContainer {
    include *
}

model { !include "System A model.dsl" }

views { !include "System A views.dsl" }


**Note**
The reason to separate a system Model and Views in different files that are included is to allow to reuse them.
System A being part of Domain D, and having the same model and views separated DSL files for System B, Domain D DSL would look like:

workspace "Domain D" { !identifiers hierarchical

model {
    !include "System A model.dsl"
    !include "System B model.dsl"
}

views {
    systemLandscape domainD domainDLandscape {
        title "Domaain landscape"
        include *
    }
    !include "System A views.dsl"
    !include "System B views.dsl"
    !include "styles.dsl"
}

}



### Steps to reproduce

1. Create 3 DSL files as exposed in the description (one for the model, one for the views and one for the workspace).
2. Run structurizr/lite Docker container, on the workspace DSL (aka SystemA.dsl)
3. open localhost in Chrome
4. No error provided, yet the rendering of the workspace is not the expected one.

### Screenshot

![Structurizr lite multi-DSL bug](https://github.com/structurizr/lite/assets/123368955/522f5d4e-8e39-4c3a-898c-601057a81f6d)

### Code sample

_No response_

### Configuration

_No response_

### Severity

Minor

### Priority

I have no budget and there's no rush, please fix this for free

### More information

Structurizr/lite 2024.03.03 (on JDK 21.0.1).
simonbrowndotje commented 5 months ago

It works for me ... I suspect the command you're using to start Lite is incorrect.

yvesaston commented 5 months ago

I managed to have it working also, moving the DSL folder from Google Drive to my local drive ; (my Google Drive is mapped to a Windows 11 drive)

I invoke structurizr/lite with:

STRUCTURIZR_WORKSPACE_PATH is located in a Google Drive, and the error shows up. STRUCTURIZR_WORKSPACE_PATH is located in my local drive, and the diagrams are properly rendered.