plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
MIT License
6.41k stars 1.1k forks source link

AddNodeTag in C4_Deployment throws an error #334

Closed wemu closed 9 months ago

wemu commented 9 months ago

Hello

I've created a C4_Deployment diagram that used to work. But newer PlantUML Versions can no longer render it - it seems the AddNodeTag statement changed.

The minimal version:

@startuml
!include <C4/C4_Deployment>

!include <tupadr3/devicons/angular>
!include <tupadr3/devicons/java>
!include <tupadr3/devicons/postgresql>
!include <tupadr3/govicons/users>
!include <tupadr3/font-awesome-5/server>

title Deployment

AddNodeTag(iscservice, $borderColor="green", $legendText="bestehende Infrastruktur")

Node(zone, "Zone", $tags=iscservice) {
    Container(spas, "SPA", "Angular", "Web-Applikation", "Browser", $sprite="angular")
}

SHOW_LEGEND()
@enduml

output on plantuml.com: https://www.plantuml.com/plantuml/png/VT1DQ_Cm30Vmkpz5dl0S4bZ9OTrjAStIiWr6DsYXi4jnOpNpwbYP9BTxOTzz2IjqXr9VREIV_i8UisYIq3Zrp_hA1GFHTJdCok5g0gt3ZmQyZDIVImcjDdIP6TZP2ZrdsjV1QHgTCwzwfy-25bbg0dvpfrYD1nOOY4-93NePw3qmDZ2uoZgs0nef9LOSHCUdAAKAOsPeOA7hn7BLIrl1HVH_ZMI0IdH8ULmJW8-xgeCQl5d0k-Jn6bZW1Nmt-DvlIBDGs4gWE5MgZqm-qNT9yJDww7j5rvmVPwJHbugwLQ8NRJrGmgtcpi-VYhZRYj-Fx8zBM0-AjdLsgyMYxqitX7i6wdEv9IkGn_hGaAflfUPtZylLm_HsEfiagHg3Dw5nFm00

same happens in asciidoctorj-diagram. Once the AddNodeTag is removed the rendering is valid.

error shown:

AddNodeTag(iscservice, $borderColor="green", $legendText="bestehende Infrastruktur")
  !$type=$type+$techn
  $addElementTagInclReuse("node", $tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $type, $l ...
^^^^^
 Function not found $addElementTagInclReuse
kirchsth commented 9 months ago

thank you for the finding, I will fix

kirchsth commented 9 months ago

@wemu: I fixed it in my extended branch, can you please test it (details see MR #335).

Thank you and best regards Helmut

wemu commented 9 months ago

awesome!

I'll try to verify this. But as I'm using the asciidoc plugin in IntelliJ ,and there the asciidoc-diagrams and there the plantuml integration and there c4 integration, I'm not quite sure how to? Would changing the include statement in the diagram to point to a local copy of the extended branch be enough?

kirchsth commented 9 months ago

Yes, if you use following include path then it should work

!include http://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Deployment.puml
wemu commented 9 months ago

hello

I tried to change the include and the broken deployment diagram works! So that fix works for me!

thanks a lot!