structurizr / dsl

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

Broken script example #321

Closed gparmeggiani closed 1 year ago

gparmeggiani commented 1 year ago

Description

The following example is broken

!script kotlin {
  workspace.views.createDefaultViews()
  workspace.views.views.forEach { it.disableAutomaticLayout() }
}

It produces the following error

workspace.dsl: Error running inline script, caused by javax.script.ScriptException: ERROR Unresolved reference: disableAutomaticLayout (ScriptingHost5eb71461_Line_0.kts:2:38) at line 102 of /usr/local/structurizr/workspace.dsl: }

Likely related to https://github.com/structurizr/java/blob/c7e33ab4effad9d97d0f75dffc64e85a852070de/docs/changelog.md?plain=1#L66

Steps to reproduce

  1. copy paste the example script from https://github.com/structurizr/dsl/blob/master/docs/language-reference.md#scripts into an example DSL workspace

  2. render the DSL with structurizr lite and observe the error message

Screenshot

No response

Code sample

No response

Configuration

No response

Severity

Minor

Priority

Medium

Resolution

I have no budget, please fix this for free

More information

No response