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

generatePDF/generateHTML: renders picture with "Syntax Error?" #1136

Closed
mh182 opened this issue Apr 28, 2023 · 6 comments · Fixed by #1141
Closed

generatePDF/generateHTML: renders picture with "Syntax Error?" #1136

mh182 opened this issue Apr 28, 2023 · 6 comments · Fixed by #1141
Labels
Milestone

Comments

@mh182
Copy link
Collaborator

mh182 commented Apr 28, 2023

On testing #395 I noticed that the new asciidoctor doesn't render PlantUML anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Download end extract example-exportStructurizr.tar.gz
  2. Go into the directory, update docToolchain to the latest revision
➜ DTC_VERSION=latest ./dtcw install doctoolchain
  1. generate the HTML, respective PDF
➜ DTC_VERSION=latest ./dtcw generateHTML
dtcw 0.50 - ##DTCW_GIT_HASH##
docToolchain latest
OS/arch: Linux/x86_64
Available docToolchain environments: local sdk docker
Environments with docToolchain [latest]: local docker
Using environment: local
Using Java 11.0.18 [/home/max/.local/share/sdkman/candidates/java/11.0.18-tem/bin/java]
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 

BUILD SUCCESSFUL in 9s
1 actionable task: 1 up-to-date
  1. Check the generated HTML page, the diagrams are not rendered correctl
➜ xdg-open build/html5/example/example.html 

Expected behavior
The images generated with exportStructurizr are rendered correctly. The PDF output has the same result.

Screenshots
image

Configuration

  • docToolchain version: commit 07b0a8a
  • OS: Linux Debian unstable
  • Browser - Firefox 112.0.1
  • Relevant SDK Versions: tested with Java 11 and Java 17, same result

Additional context
If we call generateHTML with docToolchain 2.2.1, the picture is rendered correctly.

# Use docToolchain 2.2.1
➜ ./dtcw install doctoolchain
@mh182 mh182 added the 🐞 bug label Apr 28, 2023
@mh182 mh182 added this to the Java 17 milestone Apr 28, 2023
@PacoVK
Copy link
Collaborator

PacoVK commented Apr 30, 2023

Thanks for the reproducer. What i recognized is:

  • i could not run the reproducer successfully without modifications
    • directory images not found (expected at /src/docs/ level)
    • directory structurizr not found (expected at /src/docs/ level)
      After making the changes, i could verify there is a weird behaviour. Some .puml diagrams are converted successfully (added other samples), some could not.

Adding the same diagrams from your example to the "generateHtmlSpec" could be converted successfully

TL;DR; needs further investigation

@PacoVK
Copy link
Collaborator

PacoVK commented Apr 30, 2023

For the wrong directory issues, the cause is here

The PlantUML issue is due to dependency conflicts, the actual converter uses PlantUML version 1.2018.13 this is very outdated and may not be compatible with the syntax you used. Investigating furhter

@mh182
Copy link
Collaborator Author

mh182 commented May 1, 2023

That's strange. I do not get an error about failed includes.

Were you using DTC_VERSION=latest at commit 07b0a8a?

This reminds me, we should output the git hash if we use latest or latestdev version for easier tracking of bugs.

@PacoVK
Copy link
Collaborator

PacoVK commented May 1, 2023

Okay after trolling myself for hours, i finally fixed this whole issue. We need to update org.asciidoctor.asciidoctorj-diagram to latest and as i expected it worked 07b0a8a referenced a pretty old version. I will create the patch later, after i banged my head dew times against the wall because my latest dtc points to an old version and locally i have setup dev. Forget about the include errors i had before :D jsut developer things

@mh182
Copy link
Collaborator Author

mh182 commented May 1, 2023

Don't worry. This happened to me too.

I was writing a reproducible bug report and when I was on the verge to create it, I noticed I was testing against 2.2.1 instead the current ng branch.

@mh182
Copy link
Collaborator Author

mh182 commented May 1, 2023

Fix verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants