structurizr / dsl

Structurizr DSL
https://docs.structurizr.com/dsl
Apache License 2.0
1.41k stars 265 forks source link

Container view rendered differently depending on order of "include" statements #256

Closed posto closed 1 year ago

posto commented 1 year ago

Description

Identical content of a container view is rendered differently, depending on the order of include statements.

Steps to reproduce

See example code where two diagrams, diag_1 and diag_2, should have the same output, but they don't. diag_1 doesn't show component2, even though it's included.

Screenshot

diag_1 diag_2
image image

Code sample

workspace {

    model {
        ss1 = softwareSystem "Software Sys 1" {
            c1 = container "Container 1"
        }

        ss2 = softwareSystem "Software Sys 2" {
            c2 = container "Container 2"
        }

        c1 -> c2 "Publishes data to"
    }

    views {

        container ss1 "diag_1" {
            autoLayout
            description "This diag doesn't show container2, despite it being included. It shows Software System 2 instead."
            include ->c1->
            // line below has no effect, same diagram is rendered if the line is commented out
            include c2
        }

        container ss1 "diag_2" {
            autoLayout
            description "Only by including c2 *before* c1, the diagram shows c2"
            include c2
            include ->c1->
        }
    }

}

Configuration

No response

Severity

Minor

Priority

Low

Resolution

I have no budget, please fix this for free

More information

No response