plantuml/plantuml-stdlib

C4 library does not work with Kroki server

romkavt opened this issue · 4 comments

Hello!

Please have a look to this issue yuzutech/kroki#578 (comment)
C4 library used as PlantUML standard library include does not work within local network.
We are using Kroki server to render PlantUML diagrams.

The following diagram:

title Контекст интеграции систем TC и Yoo
!include <C4/C4_Container>

Person_Ext(User, "User", "Пользователь сервисов TC и Yoo")
System_Ext(Pay, "Apple/Google")
Rel_R(User, Pay, "Использует для платежа банковской картой")

produces the error "Cannot open URL (line: 0)" with Kroki server.
The reason is:
https://github.com/plantuml/plantuml-stdlib/blob/master/C4/C4_Context.puml#L1

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml

The docker container within local network has no free access to Internet, i.e. the C4 library file preprocessing can't download included C3 files.
I assume the PlantUML server will have the same error with C4.

I think, the C4 library have to be included into PlantUML stdlib as single local file without references to remote URLs.

We are still ironing out some bugs in plantuml-stdlib/C4-PlantUML. Currently a release is being prepared that should allow you to resolve this issue (with plantuml-stdlib/C4-PlantUML#114) as well as some other semi-urgent fixes (like plantuml-stdlib/C4-PlantUML#113).

These should be completed soonish and added as an MR here (to close #31).

It looks like the issue you are seeing is because of the update to C4 v2 in 801e8df, which does not have the fixes coming up in the new C4 release.

As we are also in the process of getting the other libraries in the stdlib in a better shape, I'll add "check remote URLs are not used" to the organisation todo-list, as all stdlib repos should be able to work 100% offline.

I think, the C4 library have to be included into PlantUML stdlib as single local file without references to remote URLs.

Of course, you are right !
We've just fixed it.

Last beta is also up to date now.

Thanks for the report, this will be included in next official release.

@arnaudroques Thank you for picking this up so swiftly, this buys us some time to get things in order on our end!

Please merge #42 that the new v2.3.0 can be used without additional includes