kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

Tests failing since the appearance of HAARG/Role-Tiny-2.001003.tar.gz #141

Closed andk closed 5 years ago

andk commented 5 years ago

Current statistics:

 :   Regression#4 mod:Role::Tiny  
 : Name              Theta  StdErr  T-stat
 : [0='const']           1.0000     0.0677  14.77
 : [1='eq_2.000005']    -0.0000     0.0957  -0.00
 : [2='eq_2.000006']    -0.0000     0.0718  -0.00
 : [3='eq_2.000008']    -0.0056     0.0679  -0.08
 : [4='eq_2.000_009']   -0.0000     0.0714  -0.00
 : [5='eq_2.001001']    -0.0000     0.0710  -0.00
 : [6='eq_2.001003']    -1.0000     0.0742  -13.49
 : [7='eq_2.001_000']   -0.0000     0.0702  -0.00
 : R^2= 0.830, N= 225, K= 8

Found it on http://analysis.cpantesters.org/solved?distv=Attean-0.024#mod%3ARole%3A%3ATiny a few minutes ago. Some manual tests confirmed the suspicion that Role::Tiny 2.001003 is at the moment not compatible with Attean. Paging @haarg

Greetings,

kjetilk commented 5 years ago

Thanks a lot!

I had a look over the code, but I can't see where that could go wrong. There's a bunch of uses, especially in the iterator code, so I can imagine that if something breaks, it will break a lot. Hopefully @kasei will find time to have a look.

kjetilk commented 5 years ago

www.cpantesters.org times out for me right now, but I see the problem with one of my modules that uses Attean on Travis.

There it looks like there is a bunch of warnings, e.g.

Subroutine Attean::API::RepeatableIterator::around redefined at /home/travis/perl5/perlbrew/perls/5.31.4/lib/site_perl/5.31.4/Role/Tiny.pm line 450.
Subroutine Attean::API::RepeatableIterator::requires redefined at /home/travis/perl5/perlbrew/perls/5.31.4/lib/site_perl/5.31.4/Role/Tiny.pm line 450.
Subroutine Attean::API::RepeatableIterator::before redefined at /home/travis/perl5/perlbrew/perls/5.31.4/lib/site_perl/5.31.4/Role/Tiny.pm line 450.
Subroutine Attean::API::RepeatableIterator::after redefined at /home/travis/perl5/perlbrew/perls/5.31.4/lib/site_perl/5.31.4/Role/Tiny.pm line 450.
Subroutine Attean::API::RepeatableIterator::with redefined at /home/travis/perl5/perlbrew/perls/5.31.4/lib/site_perl/5.31.4/Role/Tiny.pm line 450.
Subroutine Attean::API::RepeatableIterator::has redefined at /home/travis/perl5/perlbrew/perls/5.31.4/lib/site_perl/5.31.4/Role/Tiny.pm line 450.

Since I have a no warnings test, the test fails.

I have looked, but I don't see why this is emitted in these modules, but not in others. The offending code is here: https://github.com/kasei/attean/blob/master/lib/Attean/API/Iterator.pm#L280 https://github.com/kasei/attean/blob/master/lib/Attean/API/Binding.pm#L351 https://github.com/kasei/attean/blob/master/lib/Attean/API/Binding.pm#L443

Great if you could have a look if you have time, @haarg .

haarg commented 5 years ago

I'm looking into this from the Role::Tiny/Moo::Role side, since there is definitely a bug there.

I've filed a PR that fixes this issue on the Attean side, by not importing Moo::Role and/or Role::Tiny multiple times in one package. This should be a sensible change even though Role::Tiny also needs to be fixed.