Search code examples
linuxmarkdownarchlinuxplantuml

VScode (Code-OSS) can't display plantUML - can't find sprite library awslib


I am in Archlinux and I have installed plantuml and VSCode. In VSCode I try to use the following Markdown code:

@startuml
!include <awslib/AWSCommon>
!include <awslib/AWSSimplified.puml>
!include <awslib/Compute/all.puml>
!include <awslib/mobile/all.puml>
!include <awslib/general/all.puml>
!include <awslib/GroupIcons/all.puml>


 skinparam linetype polyline
' skinparam linetype ortho


package "AWS Cloud" {
EC2(Smadex, "Smadex Service", " ")
}


Users(Users, "Users", " ")
TraditionalServer(AdExchange, "Ad Exchange", " ")
Mobile(Mobile, "Publisher app or web", " ")


Users -down-> Mobile: 1. Visits
Mobile -right-> AdExchange: 2. Start auction
AdExchange -right-> Smadex: 3. Bid request / response
Smadex -left-> Mobile: 4. Show Ad
Users -right-> Smadex: 5. Impression / click / install / event {request id}
@enduml

However, I get the following error:

!include <awslib/mobile/all.puml>
cannot include <awslib/mobile/all.puml>

I think because plantuml can't find plantuml sprite library . Any suggestions ?

I try to avoid importing the https://raw.github... direct URL link and using a different import statement as import AWSLib/...

I was expecting to see the plantuml diagram in Markdown Preview. I am expecting to be able to download the .puml file and import the AWS library on the plantuml path (classpath) and the plantuml.jar (/usr/share/java/plantuml/plantuml.jar) used in VSCode (OSS-Code) to be able automatically use/be able to import awslib.

Note: This question is not specific for archlinux and can be applied to linux in general and not only to awslib sprite library, but could be applied to any plantuml sprite library.


Solution

  • The macros evolved to not have Pascal case. And a few macros moved. Here's a working solution on plantuml.com:

    @startuml
    !include <awslib/AWSCommon>
    !include <aws/common>
    !include <awslib/AWSSimplified.puml>
    !include <awslib/Compute/all.puml>
    !include <awslib/General/all.puml>
    !include <awslib/GroupIcons/all.puml>
    
    
     skinparam linetype polyline
    ' skinparam linetype ortho
    
    
    package "AWS Cloud" {
    EC2(Smadex, "Smadex Service", " ")
    }
    
    
    Users(Users, "Users", " ")
    
    Traditionalserver(AdExchange, "Ad Exchange", " ")
    
    Mobileclient(Mobile, "Publisher app or web", " ")
    
    
    Users -down-> Mobile: 1. Visits
    Mobile -right-> AdExchange: 2. Start auction
    AdExchange -right-> Smadex: 3. Bid request / response
    Smadex -left-> Mobile: 4. Show Ad
    Users -right-> Smadex: 5. Impression / click / install / event {request id}
    @enduml
    

    plantuml image