awslabs / aws-icons-for-plantuml

PlantUML sprites, macros, and other includes for Amazon Web Services services and resources
Other
908 stars 155 forks source link

SyntaxError when using EventBridgeDefaultEventBus/EventBridgeCustomEventBus #37

Closed HWiese1980 closed 2 years ago

HWiese1980 commented 3 years ago

Hi, I'm using the latest Docker container for running a PlantUML server to render my diagrams. It works most of the time. One thing though does not.

I'm getting a SyntaxError when I try to create a EventBridgeDefaultEventBus node. Same about EventBridgeCustomEventBus.

Here's my example code:

@startuml
!include <awslib/AWSCommon>
!include <awslib/ApplicationIntegration/all.puml>

hide stereotype
left to right direction

EventBridgeDefaultEventBus(a, "b", "c")

@enduml

The result is a simple red "Syntax Error?" message.

My PlantUML version is 1.2021.7

What is wrong here?

gadams999 commented 2 years ago

Hi,

The version included in the PlantUML jar(stdlib) file doesn't include these newer icons. If you access directly from this repo or download the dist/ directory contents, those will work. Here's an example of the includes that renders the EventBridge icon. Note the reference to the specific tagged release.

@startuml
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v11.1/dist
!includeurl AWSPuml/AWSCommon.puml
!includeurl AWSPuml/ApplicationIntegration/all.puml

hide stereotype
left to right direction

EventBridgeDefaultEventBus(a, "b", "c")

@enduml

The challenge of incorporating these icons into the main plantuml file is the upkeep. Every AWS release of icons incorporate or fixes minor errors from previous releases, or moves icons from one directory to another. Early on we attempted to manually track these changes, but in the end decided to go with a versioning approach. If you reference an icon through a specific version, e.g., !define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v11.1/dist for the v11.1 release, these will continue to work even if icons move in future releases.

We do have a discussion going on in another thread of managing the stdlib process and some of the pros and cons.

Hope this helps and sorry for the delay!