Bug#966935: libpandoc-wrapper-perl: FTBFS: dh_auto_test: error: perl Build test --verbose 1 returned exit code 1
itd
itd at net.in.tum.de
Tue Aug 11 22:47:53 BST 2020
Hi,
Lucas Nussbaum <lucas at debian.org> writes:
>> # at t/methods.t line 86.
>> # got: '<h1 data-number="1" id="x" data-number="1"><span class="header-section-number">1</span> x</h1>
>> # '
>> # expected: '<h1 id="x"><span class="header-section-number">1</span> x</h1>
>> # '
>> # Looks like you failed 1 test of 36.
my best guess is that this is caused by changes in pandoc or its
dependencies. (And the duplicate 'data-number' attribute did not appear
in pandoc newer than 2.9.2.)
In case that's an option: require pandoc 2.9.1 and patch the test.
>> # Failed test 'parse->to_html'
>> # at t/parse.t line 35.
>> # Looks like you failed 1 test of 5.
Above test does something along the following lines and expects output
(but none is produced):
#!/usr/bin/env perl
# libpandoc-elements-perl 0.38-1
# libpandoc-wrapper-perl 0.9.0-1
use Pandoc;
print(pandoc->parse( 'markdown' => '# A *section*' )->to_html);
# EOF
'to_html' is declared around line 461 in lib/Pandoc/Elements.pm of
libpandoc-elements-perl (in a 'foreach' loop). In parts it does
something similar ('"blocks"' value simplified) to:
#!/bin/bash
# pandoc 2.9.1.1-3
pandoc -f json -t html<<<'{"blocks":[],"pandoc-api-version":[1,17],"meta":{}}'
# EOF
which produces the following output:
> JSON parse error: Error in $: Incompatible API versions: encoded with
> [1,17] but attempted to decode with [1,20].
After bumping 1,17 to 1,20 in above command pandoc produces an empty
HTML document. libpandoc-wrapper-perl's test succeeds with the
following libpandoc-elements-perl hack (I'm not convinced it is
correct):
--- libpandoc-elements-perl-0.38.orig/lib/Pandoc/Elements.pm
+++ libpandoc-elements-perl-0.38/lib/Pandoc/Elements.pm
@@ -23,6 +23,7 @@ my $PANDOC_BIN_MIN = Pandoc::Version->ne
# release version => minimal required api version
my @REQUIRED_API = map { Pandoc::Version->new($_) }
+ '2.9.1' => '1.20', # TODO this is a blindtext; please remove this FIXME
'1.19' => '1.17', # pandoc 1.19 has api 1.17.0.4, compatible with api 1.17
'1.18' => '1.17', # pandoc 1.18 has api 1.17.0.4, compatible with api 1.17
'1.16' => '1.16', # pandoc 1.16 has api 1.16
Regards
itd
More information about the pkg-perl-maintainers
mailing list