Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The PlantUML preprocessor should be executed when the diagram type is c4plantuml #126

Closed
ggrossetie opened this issue Jul 29, 2020 · 6 comments · Fixed by #217
Closed

The PlantUML preprocessor should be executed when the diagram type is c4plantuml #126

ggrossetie opened this issue Jul 29, 2020 · 6 comments · Fixed by #217
Labels
🍩 enhancement New feature or request

Comments

@ggrossetie
Copy link
Member

In this case, we should not try to resolve the following targets:

  • c4.puml
  • c4_component.puml
  • c4_container.puml
  • c4_context.puml

In fact, the above files will be resolved server-side.
I think we should not resolve them only when the path is local:

  • /path/to/C4.puml
  • /path/to/c4_component.puml
@ggrossetie ggrossetie added the 🍩 enhancement New feature or request label Aug 14, 2020
@mwabik
Copy link
Contributor

mwabik commented Sep 16, 2020

Could it be changed to be more generic than just for c4?

We have issue when pre-processing https://github.com/tmorin/plantuml-libs/tree/master/cloud inclusion in local mode:

!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="./cloud/"
!include ./cloud/library.puml

However, our internal Kroki server handles that just fine.

@ggrossetie
Copy link
Member Author

We already do that for remote files but not for local files:

https://github.com/Mogztter/asciidoctor-kroki/blob/762eb16ce99607b89ad02af01c1183e89cee244c/src/preprocess.js#L182-L184

The reasoning was that local files should be resolved locally. If I understand correctly the file ./cloud/library.puml is not available locally (i.e. only available on the Kroki server)?

We could either add an option or ignore the error if a local file cannot be resolved.

@mwabik
Copy link
Contributor

mwabik commented Sep 16, 2020

Yes, those files only exist on the Kroki server. And they are not resolvable locally. Using same logic as for remote files pre-processing logic would solve it.

@anb0s
Copy link
Contributor

anb0s commented Feb 10, 2021

Related to #147 ? If configured to ignore local include errors, this will work... or better as configuration for exclude-patterns?

@ggrossetie
Copy link
Member Author

or better as configuration for exclude-patterns?

That's a good idea and probably more flexible than kroki-plantuml-unresolved-local-include

@ggrossetie
Copy link
Member Author

Yes, those files only exist on the Kroki server. And they are not resolvable locally. Using same logic as for remote files pre-processing logic would solve it.

For reference, the issue described by @mwabik was fixed in fe014df

ggrossetie added a commit that referenced this issue Feb 16, 2021
resolves #126 execute the PlantUML preprocessor when type is c4plantuml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍩 enhancement New feature or request
Projects
None yet
3 participants