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

support local imports without changes #114

Closed
dstockhammer opened this issue Feb 3, 2021 · 3 comments · Fixed by #107
Closed

support local imports without changes #114

dstockhammer opened this issue Feb 3, 2021 · 3 comments · Fixed by #107
Labels
enhancement New feature or request
Milestone

Comments

@dstockhammer
Copy link

dstockhammer commented Feb 3, 2021

It would be great if local imports could be supported/enabled out of the box without having to make changes to any code. That would make it possible to include this repo as submodule. For certain use cases it may not be acceptable to pull files from github on build and having a local copy is required.

I've made that scenario work with a fork, see dstockhammer@d444d99

But assuming that there will be breaking changes with v2 anyway (?), now might be a good time to consider supporting this use case natively.

A possible solution would be to not include dependencies in the individual files, but instead have two entrypoints, say C4_all.puml and C4_all_local.puml that include all dependencies in the right order: One uses github imports and the other uses local imports. That way the user can choose which way to import. The downside of this approach is of course that all components would always be included, but I think that's an acceptable tradeoff. The user would always be able to customize which components to import by not relying on C4_all and importing the required files manually.

@Potherca
Copy link
Member

Potherca commented Feb 4, 2021

@dstockhammer You are not alone in wanting to use local import... @kirchsth has implemented a RELATIVE_INCLUDE variable in #107 which makes it possible to use local version with an additional command line argument:

java -jar plantuml.jar -DRELATIVE_INCLUDE="/path/to/files"  ...

@dstockhammer
Copy link
Author

Awesome! That's great to hear; I was not aware of that development. Looking forward to the merge so I can get rid of my fork :)

@romkavt
Copy link

romkavt commented Feb 5, 2021

I add my vote for this issue and have to mention
plantuml/plantuml-stdlib#32

Includes with network URL's in C4 library files makes them unusable as part of Plantuml-stdlib on servers.

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
Status: Done
3 participants