Appstream2.0 is broken
iwat opened this issue · 3 comments
Definitions contain dot, I think they don't work.
!define Appstream2.0(e_alias, e_label, e_techn) ...
!define Appstream2.0(e_alias, e_label, e_techn, e_descr) ...
!define Appstream2.0Participant(p_alias, p_label, p_techn) ...
!define Appstream2.0Participant(p_alias, p_label, p_techn, p_descr) ...
I tried this:
@startuml
title EndUserComputing
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/master/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/EndUserComputing/all.puml
Appstream2.0(Alias, "Label", "Tech")
@enduml
And I got this:
.0Participant(p_alias ... Syntex Error?
It looks like dots are used in different contexts in PlantUML. Didn't catch this one. I think the best approach is to have the script that generates the default names replace dots .
with underscores _
, and to modify the curated set of icons in the master and subsequent releases to include that also.
So in this case, Appstream2.0
will become Appstream2_0
. I'll verify that this works for sprite names and usage in a definition and diagram.
Confirmed that the legacy preprocessor, which is still the one in use, follows the C language specification:
You can define constant using the
!define
directive. As in C language, a constant name can only use alphanumeric and underscore characters, and cannot start with a digit.
So I will add checks to convert any non-alphanumeric characters to underscores.
Resolve in master branch. AppStream2.0
is now AppStream2_0
. This diagram now resolving:
@startuml
title EndUserComputing
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/master/dist
!include AWSPuml/AWSCommon.puml
!include AWSPuml/EndUserComputing/Appstream2_0.puml
Appstream2.0(Alias, "Label", "Tech")
@enduml
Active in master branch, will be incorporated into next icon set release tag.