plantuml / plantuml-stdlib

Contains official Standard Library for PlantUML
557 stars 122 forks source link

C4 library does not work with Kroki server #32

Closed romkavt closed 3 years ago

romkavt commented 3 years ago

Hello!

Please have a look to this issue https://github.com/yuzutech/kroki/issues/578#issuecomment-773206862 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.

Potherca commented 3 years ago

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 https://github.com/plantuml-stdlib/C4-PlantUML/issues/114) as well as some other semi-urgent fixes (like https://github.com/plantuml-stdlib/C4-PlantUML/issues/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 801e8dfaa9d45e6e67bf4aa97ee80b9fa1bdca1b, 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.

arnaudroques commented 3 years ago

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.

Potherca commented 3 years ago

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

kirchsth commented 3 years ago

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