libxml-raku / LibXML-raku

Raku bindings to the libxml2 native library
Artistic License 2.0
11 stars 5 forks source link

Occasional fail during installation #39

Closed jnthn closed 4 years ago

jnthn commented 4 years ago

I just got this:

===> Searching for: LibXML
===> Searching for missing dependencies: XML, Method::Also
===> Building: LibXML:ver<0.4.0>:auth<cpan:WARRINGD>
===> Building [OK] for LibXML:ver<0.4.0>:auth<cpan:WARRINGD>
===> Testing: XML:ver<0.3.0>:auth<Timothy Totten>
===> Testing [OK] for XML:ver<0.3.0>:auth<Timothy Totten>
===> Testing: Method::Also:ver<0.0.5>:auth<cpan:ELIZABETH>
===> Testing [OK] for Method::Also:ver<0.0.5>:auth<cpan:ELIZABETH>
===> Testing: LibXML:ver<0.4.0>:auth<cpan:WARRINGD>
[LibXML] # Running libxml2 version: 2.09.03 (module 0.4.0)
[LibXML] Constraint type check failed in binding to parameter '$_'; expected UInt but got Int (-681227272)
[LibXML]   in sub box-class at /home/jnthn/.zef/store/LibXML-0.4.0.tar.gz/LibXML-0.4.0/lib/LibXML/Item.rakumod (LibXML::Item) line 74
[LibXML]   in code  at /home/jnthn/.zef/store/LibXML-0.4.0.tar.gz/LibXML-0.4.0/lib/LibXML/Item.rakumod (LibXML::Item) line 194
[LibXML]   in method box at /home/jnthn/.zef/store/LibXML-0.4.0.tar.gz/LibXML-0.4.0/lib/LibXML/Item.rakumod (LibXML::Item) line 192
[LibXML]   in block <unit> at t/99doc-examples.t line 151
[LibXML]     # You planned 8 tests, but ran 6
===> Testing [FAIL]: LibXML:ver<0.4.0>:auth<cpan:WARRINGD>
Aborting due to test failure: LibXML:ver<0.4.0>:auth<cpan:WARRINGD> (use --force-test to override)

However, the next attempt was successful (and I've not seen this happen before either).

dwarring commented 4 years ago

I'm also getting occasional failures on the same line when I stress this test:

$ git diff 
diff --git a/t/99doc-examples.t b/t/99doc-examples.t
index 84dfbe6..2a18b72 100644
--- a/t/99doc-examples.t
+++ b/t/99doc-examples.t
@@ -66,7 +66,8 @@ subtest 'LibXML::CDATA' => {
 }

 subtest 'LibXML::Document' => {
-    plan 8;
+    plan 800;
+    for 1 .. 100 {
     use LibXML;
     my $version = '1.0';
     my $enc = 'UTF-8';
@@ -160,6 +161,7 @@ subtest 'LibXML::Document' => {
     is $doc.encoding, 'ISO-8859-15';
     $doc .= parse(' <x>zzz</x>');
     is $doc.root.Str, '<x>zzz</x>';
+    }
 };

E.g.

$ prove -e'raku -I .' t/99doc-examples.t 
t/99doc-examples.t .. 1/18 node type not yet handled: 1861957056
  in block  at /tmp/LibXML-raku/lib/LibXML/Native.rakumod (LibXML::Native) line 1231
src/xml6_ref.c:75: 0x560870323ef0 is not owned by us, or is corrupted
Cannot resolve caller TWEAK(LibXML::Dtd:D: :native(LibXML::Native::anyNode), :doc(LibXML::Document)); none of these signatures match:
    (LibXML::Dtd: LibXML::Native::xmlDtd:D :native($)!, *%_)
    (LibXML::Dtd: Str:D :$type!, LibXML::Node :doc($owner), Str:D :$name!, Str :$external-id, Str :$system-id, *%_)
  in method new at /tmp/LibXML-raku/lib/LibXML/Dtd.rakumod (LibXML::Dtd) line 102
  in code  at /tmp/LibXML-raku/lib/LibXML/Item.rakumod (LibXML::Item) line 189
  in method box at /tmp/LibXML-raku/lib/LibXML/Item.rakumod (LibXML::Item) line 185
  in block  at t/99doc-examples.t line 152
  in sub subtest at /home/david/git/rakudo/install/share/perl6/core/sources/2D4A7CA10695CD2B374573413D261A660E282E2A (Test) line 430
  in sub subtest at /home/david/git/rakudo/install/share/perl6/core/sources/2D4A7CA10695CD2B374573413D261A660E282E2A (Test) line 419
  in block <unit> at t/99doc-examples.t line 68

    # You planned 800 tests, but ran 734
dwarring commented 4 years ago

Fixed in 95d5891