New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visitor Pattern requires too much CPU and causes the compile error #5342
Comments
From @titsukiHi. -- $ git clone https://github.com/titsuki/p6-Bug-VIsitor.git Test Summary Report t/01-basic.t (Wstat: 256 Tests: 0 Failed: 0) $ perl6 --version -- |
From @titsukiI have attached the source code. On 2016-5月-28 土 03:34:25, cookbook_000@yahoo.co.jp wrote:
|
From @smlsYou have circular dependency between your two modules. That's not allowed. In Bug/Acceptor.pm, instead of doing `use Bug::Visitor;`, predeclare it instead using `class Bug::Visitor {...}`. (Yes, those are three literal dots in the source code.) I'm leaving the ticket open for now, because I don't know if the cyclic dependency should be detected by the compiler. Currently, it just keeps eating more and more RAM until the kernel kills the program. Minimalist test case to reproduce the problem: ➜ echo "use B;" > A.pm |
The RT System itself - Status changed from 'new' to 'open' |
From @smlsRelevant info from IRC discussion: psch: we did have circular module loading detection at some point... probably got clobbered with all the CUR work though :/ |
From @titsukiThanks for the reply ! A.pm B.pm class B { -- On 2016-5月-28 土 09:01:57, smls75@gmail.com wrote:
|
From @titsuki*predeclaration On 2016-5月-28 土 18:53:10, cookbook_000@yahoo.co.jp wrote:
|
From @smlsHm you're right, predeclaration doesn't seem to be the correct solution to your problem after all. But this bug tracker is not the right place for Perl 6 user support, it should be reserved for collecting info on actual Rakudo bugs. As for the issue of Rakudo failing to detect the cyclic dependency and printing an appropriate error message for it, I've submitted a new ticket for that to keep it clean: [perl #128285] |
@smls - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#128275 (status was 'rejected')
Searchable as RT128275$
The text was updated successfully, but these errors were encountered: