Hi,
I am trying to split my project in multiple files, but I encounter some problems with both, the old preprocessor (plantuml v1.2019.03) and the new one (plantuml v1.2019.06beta22).
I have the following setup:
project/
+ subdir/
| + component1.puml
| + container.puml
+ app.puml
If you give the file component1.puml the following code:
@startuml
!startsub COMP_CLASS
class CompPuml
!endsub
@enduml
The file container.puml
@startuml
!includesub component.puml!COMP_CLASS
class SubPuml
@enduml
And the file app.puml
@startuml
!include sub/inc.puml
@enduml
Then the stable plantuml version generates following output:
[From sub/sub.puml (line2)]
---------------------------
@startuml
!includesub comp.puml!COMP_CLASS
Cannot include comp.puml
The beta plantuml version results in the following output:
[From sub/sub.puml (line2)]
---------------------------
@startuml
!includesub comp.puml!COMP_CLASS
Sytanx Error?
If I use !include, then the stable plantuml will not trigger an error, while the beta version will generate the same output, but it seems plantuml returns an error code. Because when using the GUI of plantuml, the list shows there was an error, however, the generated png is correct.
When also removing the !startsub and !endsub lines in component.puml, both versions of plantuml work fine.
The issue is that !includesub behaves differently from which directories it tries to include the files. I expect the behaviour like !include, if file1 includes file2, and file2 includes (a part of) file3, the include to file3 in file2 is relative to file2. This seems not the case. I also tried to include relative from the working directory or the root file (app.puml in my example above), but nothing works.
Am I doing something wrong or is this a bug in plantuml?
ps: I made a zip which you can download through wetransfer: https://we.tl/t-dyIFu0ooWM. This zip contains some files which simulates the above issue. includesub.puml is the actual issue I want to report. include.puml is the issue that the beta version generates the correct png, but plantuml reports there is an error. The last version is the version that works like it should.