nine++ has attempted to fix this issue:

https://github.com/rakudo/rakudo/commit/c59e4dc44772cb09edeb8aa7f0ce0385f951cf5d

Though it seems to have made the failure more random.

Try the following:
while true; do
    test -e lib && rm -r lib; # this is needed to trigger it for some reason
    mkdir lib;
    echo 'class One { }; need Two;' > lib/One.pm6
    echo 'class Two { }; need Three;' > lib/Two.pm6
    echo '' > lib/Three.pm6
    perl6 -Ilib -e 'need One;'
    touch lib/Three.pm6
    perl6 -Ilib -e 'need One; say GLOBAL::.keys;'
done

gives me:

(Two One)
()
(Two One)
()
(Two One)
()
(Two One)
(Two One)
(Two One)
(Two One)
(Two One)
()

I wrote a test and push it to roast.

https://github.com/perl6/roast/commit/4e8b2e02e77e607593907380d30898ff5a926bd7

It seems to have the same issue.

On Sat, May 21, 2016 at 1:45 AM Lloyd Fournier <lloyd.fo...@gmail.com>
wrote:

> It seems to have been introduced by one of nine's commits on the 13th.
> This or one of the commits just before it I think:
>
>
> https://github.com/rakudo/rakudo/commit/4fb3f94fcd39699f69e9d175315f9f1357e8faf3
>
>
> On Fri, May 20, 2016 at 11:26 PM Lloyd Fournier <lloyd.fo...@gmail.com>
> wrote:
>
>> err leme try that again
>>
>> Precomp is broken for dependency chains 3 or longer when one of the
>> dependencies down the chain is *changed*.
>>
>> To expand: Sometimes it gives you a problem where you get "Missing or
>> wrong version of dependency" and sometimes symbols that should have been
>> merged from GLOBALish just aren't there which is the case in the example
>> above.
>>
>> On Fri, May 20, 2016 at 11:18 PM Lloyd Fournier <lloyd.fo...@gmail.com>
>> wrote:
>>
>>> I've been getting something similar and I've managed to golf it.
>>>
>>> mkdir lib;
>>> echo 'class One { }; need Two;' > lib/One.pm6
>>> echo 'class Two { }; need Three;' > lib/Two.pm6
>>> echo '' > lib/Three.pm6
>>> perl6 -Ilib -e 'need One; say (GLOBAL::<One>:exists ?? "OK" !! "NOT OK")'
>>> echo "changing file" && touch lib/Two.pm6 # Three.pm6 will also break
>>> perl6 -Ilib -e 'need One; say (GLOBAL::<One>:exists ?? "OK" !! "NOT OK")'
>>>
>>> summary:  Precomp is broken for dependency chains 3 or longer when one
>>> of the dependencies down the chain is broken.
>>>
>>> Do we have a way of writing tests for precomp?
>>>
>>>
>>>
>>>
>>> On Tue, May 17, 2016 at 4:23 AM mt1957 <perl6-bugs-follo...@perl.org>
>>> wrote:
>>>
>>>> # New Ticket Created by  mt1957
>>>> # Please include the string:  [perl #128156]
>>>> # in the subject line of all future correspondence about this issue.
>>>> # <URL: https://rt.perl.org/Ticket/Display.html?id=128156 >
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I get the following error more often than before after some edits in my
>>>> source files.
>>>>
>>>> Missing or wrong version of dependency
>>>>
>>>> '/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/lib/MongoDB/Wire.pm6
>>>> (MongoDB::Wire)' (from
>>>>
>>>> '/home/marcel/Languages/Perl6/Projects/mongo-perl6-driver/lib/MongoDB/Cursor.pm6
>>>> (MongoDB::Cursor)'
>>>>
>>>> A remedy to this is to touch all source files in the library I work on
>>>> and than retry. I think that this should not happen, at least not that
>>>> often (I've seen it several times in about a week I think, twice this
>>>> evening, to give an idea).
>>>>
>>>> This is Rakudo version 2016.04-200-gad82657 built on MoarVM version
>>>> 2016.04-134-g9879233
>>>> implementing Perl 6.c.
>>>>
>>>> Greetings,
>>>> Marcel
>>>>
>>>

Reply via email to