teodozjan / pod6-coverage

Artistic License 2.0
4 stars 8 forks source link

Endless loop of t/selftest.t #20

Closed niner closed 8 years ago

niner commented 8 years ago

When trying to install on current rakudo, the tests run into an endless recursion. Attaching a backtrace:

backtrace.txt

teodozjan commented 8 years ago

I'm not sure what changed but there are various things in exported symbols. Like JSON library that is imported...

      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Test::Coverage  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Sub  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      JSON  in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:44
      Died
        in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:45
        in method parse-exports at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:149
        in method parse at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:93
        in method check at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage/Full.pm6:31
        in method coverage at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage.pm6:64
        in block  at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage.pm6:47
        in method use-meta at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Pod/Coverage.pm6:45
        in sub coverage at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Test/Coverage.pm6:34
        in sub coverage_ok at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Test/Coverage.pm6:9
        in sub subtest_coverage_ok at /home/kamil/pod6-coverage/.panda-work/1449053159_1/lib/Test/Coverage.pm6:17
        in block <unit> at t/selftest.t:9
sylvarant commented 8 years ago

I have similar issues ever since upgrading perl6

teodozjan commented 8 years ago

The problem lies in https://github.com/teodozjan/pod6-coverage/blob/master/lib/Pod/Coverage/Full.pm6#L146

for $whoO.WHO<EXPORT>.WHO<ALL>.WHO.values -> $val 

Contains all imported modules. In this case JSON and everything goes into indefinite recurstion. I can add double check protection but I'm afraid this hacky solution is wrong. JSON is not a part of tested module so should not appear here at all

> Pod::Coverage::Full.WHO<EXPORT>.WHO<ALL>.WHO.values
Method 'gist' not found for invocant of class 'NQPMatch'
> Pod::Coverage::Full.WHO<EXPORT>.WHO<ALL>.WHO.keys
(NQPMatch NQPCursorRole HLL NativeCall QRegex Grepper QAST NQPCursor NQPRegexMethod JSON NQPRegex)

on the other hand:

> use Test::Coverage
> Test::Coverage.WHO<EXPORT>.WHO<ALL>.WHO.values
(sub coverage_ok ($metafile) { #`(Sub|151560720) ... } sub subtest_anypod_ok ($metafile, $identity = { ... }) { #`(Sub|151560872) ... } sub subtest_coverage_ok ($metafile, $identity = { ... }) { #`(Sub|151561024) ... })
teodozjan commented 8 years ago

https://github.com/teodozjan/pod6-coverage/commit/0c28383ba56aee8a7903346fae6f3ca2cce800a7

teodozjan commented 8 years ago

Perl6 is under heavy development now. Everyday I have different error so this defect has to wait until Christmas

teodozjan commented 8 years ago

There is no longer infinite loop