On Tue, 28 Jul 2020 17:17:32 +0200 Tomas Janousek <t...@nomi.cz> wrote:
I was a bit confused how could ditaa work in plantuml as the usage in there
doesn't match the API in ditaa:

https://sources.debian.org/src/plantuml/1:1.2020.2+ds-1/src/net/sourceforge/plantuml/ditaa/PSystemDitaa.java/#L121
vs
https://sources.debian.org/src/ditaa/0.10+ds1-1.2/src/org/stathissideris/ascii2image/graphics/Diagram.java/#L113

Turns out it only works because plantuml includes its own (patched) version of
ditaa:
https://sources.debian.org/src/plantuml/1:1.2020.2+ds-1/src/org/stathissideris/ascii2image/graphics/Diagram.java/#L109

Therefore I find it confusing and unnecessary to depend on ditaa and patch the
full path to ditaa.jar into classpath in
https://sources.debian.org/src/plantuml/1:1.2020.2+ds-1/debian/patches/pdf.patch/
(Depending on ditaa pulled in the jarwrapper dependency, which seems to
duplicate functionality already provided by
/usr/lib/jvm/java-11-openjdk-amd64/lib/jar.binfmt)

It's also worth noting that the included (patched) version of ditaa is, if I
remember correctly, a bit older than the 0.10 we have in Debian. So you may
want to drop the included ditaa and use the one shipped in Debian instead
(but that one also seems unmaintained and behind upstream, unfortunately). In
that case it'll be helpful to know that the patching done in plantuml is
unnecessary and PSystemDitaa.java can be made to work with vanilla ditaa:
https://salsa.debian.org/liskin/plantuml/-/commit/5ee7fe82b098fa1402eb43acfff0fcc1bd19dbc4#96bdf10a122277d146e589cf010af72842d73ddd

Alternatively you may just drop the dependency and let plantuml use its own
copy of ditaa as it does upstream. Or you can also update the embedded ditaa
in plantuml, which is what I do in https://salsa.debian.org/liskin/plantuml/
(I'm now in the process of rebasing onto current Debian version).
Thanks a lot, I have finally found time to pull your patches in.

--
Cheers,
  Andrej

Reply via email to