structurizr / dsl

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

Cannot invoke "Object.equals(Object)" because "r" is null #289

Closed simonbrowndotje closed 1 year ago

simonbrowndotje commented 1 year ago

Description

The code sample below fails with the message, Cannot invoke "Object.equals(Object)" because "r" is null at line 10: b -> a, rather than saying that the relationship already exists.

Steps to reproduce

Use the below code sample on structurizr.com/dsl

Screenshot

No response

Code sample

workspace {

  model {
        a = softwareSystem "A"
        b = softwareSystem "B" {
            c = container "C"
        }

        c -> a
        b -> a
  }

}

Configuration

No response

Severity

Minor

Priority

Low

Resolution

I'm willing to fix this myself and raise a PR

More information

No response

simonbrowndotje commented 1 year ago

For some commentary ... implied relationships are enabled by default, so c -> a creates two relationships (c -> a and b -> a). The following line should then fail, because b -> a exists already.