Syntax error "</w>" with includesub with comments since 2018.11

0 votes
asked Apr 17, 2019 in Bug by rd27 (460 points)

The second file below will result in a "</w> Syntax Error" as shown at https://pasteboard.co/IatVBso8.png. This has been a problem since 2018.11. The files render correctly with 2018.9. The problem seems to be the comment line in the first file. Removing it causes the second file to render correctly.

Thanks!

dave

includeSubIssueInclude.puml

@startuml

!startsub MAIN

' Comment

rectangle z

!endsub MAIN

rectangle test

@endum

@startuml

!includesub includeSubIssueInclude.puml!MAIN

rectangle x

@enduml

commented Apr 17, 2019 by rd27 (460 points)
Note it still remains broken with 2019.4. Thx.
commented Apr 17, 2019 by rd27 (460 points)
The error shown on the command line is

Error line 2 in file: /Users/drees/IdeaProjects/plantuml/platuml/issues/includeSubIssueContainer.puml
Some diagram description contains errors
commented Apr 22, 2019 by rd27 (460 points)
'*********** file includesub includeSubIssue2_include.pum
@startuml
!startsub MAIN

!define NEW_SKINPARAMS(type) BorderColor<<type##_NEW>> #Red

skinparam database {
  NEW_SKINPARAMS(SOURCE_REPO)
}

!endsub MAIN

rectangle i

@enduml

' ********** other file
@startuml

left to right direction

!includesub includeSubIssue2_include.puml!MAIN

rectangle a

@enduml

1 Answer

+1 vote
answered Apr 17, 2019 by plantuml (294,960 points)
Thanks for the feedback.

This should be fixed in last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's not working for you!
commented Apr 20, 2019 by rd27 (460 points)
Yes, that fixed it. Thanks!
commented Apr 22, 2019 by rd27 (460 points)
Actually, I found another case. The following works correctly in 1.2018.9, but gives the "</w> Syntax Error" in 1.2019.5beta17 and 1.2019.4.
commented Apr 23, 2019 by plantuml (294,960 points)
We are currently moving to a new preprocessor implementation (see http://plantuml.com/preprocessing-v2 )
So we do not want to spend to much time on some code that will be soon removed.

Since this new one is going to be the default one, would it be possible that you use it for now (you just have to add !preprocessorV2 at the begining of your diagrams).
Your example indeed seems to work with the V2 preprocessor.

And this way, you could beta-test the new preprocessor.

What do you think about it ?
commented Apr 24, 2019 by rd27 (460 points)
Adding it does handle that case.

One challenge in using I have found though is if  !preprocessorV2 is in an included file I get a red Syntax Error. So I forced to switch to !includesub in many places I was using !include.

I also can't seem to add !preprocessorV2 as a default config in the IDEA plugin -
https://github.com/esteinberg/plantuml4idea/issues/219
commented Apr 24, 2019 by krasa (820 points)
fyi that "default config in the IDEA plugin" goes to net.sourceforge.plantuml.SourceStringReader as 'List<String> config' param
commented Apr 24, 2019 by plantuml (294,960 points)
This !preprocessorV2 is really a temporary thing.
So in last beta http://beta.plantuml.net/plantuml.jar we have enable the new preprocessor by default.
This way, you can test it directly. Thanks!
commented Apr 26, 2019 by rd27 (460 points)
FYI, With 1.2019.5 adding !preprocessorV2 via --config seems to cause a Syntax Error (while adding it in the *.puml fine does not). Not sure how long you plan !preprocessorV2 to be around.
...