asciidoctor-intellij-plugin
asciidoctor-intellij-plugin copied to clipboard
Kroki rendering SVG instead of PNG on Mac
Observed vs. expected behavior
When I do a ./gradlew test
, 3 tests are failing. One of the failing tests is testShouldRenderVega
, where the expectation is: https://kroki.io/vega/png/eNqVV...
, but the actual result is https://kroki.io/vega/eNqVV...
. As you can see, the difference is the PNG part. I'm not familiar with how Kroki works, and how it's making the distinction between png and svg, but maybe the Mac needs some extra dependency? I couldn't find it in the developer guide.
Steps to reproduce
- Buy mac
- Run Gradle test
Alternatively, using a build matrix perhaps? (if you want, I might be able to copy our config from Datafaker)
Environment
Mac M2
Thanks for reporting this issue. This is due to the following history:
- JavaFX is notoriously bad in rendering SVGs. When using JavaFX as a preview, switch all diagrams from SVG to PNG.
- JavaFX is known to run bad on some architectures (especially Windows 32bit JDKs which are now very outdated). So I whitelisted some 64 bit architectures where I knew it works well.
I opened a PR #1546 were we can discuss possible remedies.
I doubt that this justifies running all tests also on M*-runners, as the "this works on Mac" is something that only shows nicely in the UI, which is not simply solved by a unit test. Let's first discuss in the PR how this can behave on Mac.