structurizr / lite

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

New versions of StruturizrR Lite fail to parse some relationships #71

Closed max-arshinov closed 1 year ago

max-arshinov commented 1 year ago

Description

New versions of StruturizrR Lite fail to parse some relationships. I provided one example, but there are others. Sometimes it fails if a relationship doesn't have a description.

Steps to reproduce

  1. Checkout https://github.com/max-arshinov/masad/tree/main
  2. Update line 21 of the model.dsl file:
    • before update: internetBankingSystem -> email "Sends email using"
    • after update: internetBankingSystem -> email "Sends e-mail using"

Expected behavior StructurizR updates the relationship comment.

Actual behavior StructurizR fails with the following error workspace.dsl: Cannot invoke "Object.equals(Object)" because "r" is null at line 21: internetBankingSystem -> email "Sends e-mail using" at line 5: !include model.dsl

Screenshot

image

Code sample

group "Big Bank plc" {
    mainframe = softwaresystem "Mainframe Banking System" "Stores all of the core banking information about customers, accounts, transactions, etc." "Existing"
    supportStaff -> mainframe "Uses"

    email = softwaresystem "E-mail System" "The internal Microsoft Exchange e-mail system." "Existing"
    email -> customer "Sends e-mails to"

    atm = softwaresystem "ATM" "Allows customers to withdraw cash." "Existing"
    atm -> mainframe "Uses"

    customer -> atm "Withdraws cash using"

    internetBankingSystem = softwaresystem "Internet Banking System" "Allows customers to view information about their bank accounts, and make payments." {
        !include internet-banking-system/ibs.dsl
    }
    internetBankingSystem -> mainframe "Gets account information from, and makes payments using"
    internetBankingSystem -> email "Sends e-mail using" 
    customer -> internetBankingSystem "Views account balances and makes payments using"
}

Configuration

services: target-architecture: container_name: software-architecture-documentation-target image: structurizr/lite volumes:

Severity

Critical

Priority

High

Resolution

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

More information

No response

simonbrowndotje commented 1 year ago

This is likely fixed in the DSL parser, but needs a release -> https://github.com/structurizr/dsl/issues/289

simonbrowndotje commented 1 year ago

This is now available as build 3088.

max-arshinov commented 1 year ago

I've just checked this. The error message is clear now. Thank you.