Skip to content
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

OOM Killer bug with multiple -I CLI options #5069

Open
p6rt opened this issue Jan 20, 2016 · 1 comment
Open

OOM Killer bug with multiple -I CLI options #5069

p6rt opened this issue Jan 20, 2016 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 20, 2016

Migrated from rt.perl.org#127329 (status was 'new')

Searchable as RT127329$

@p6rt
Copy link
Author

p6rt commented Jan 20, 2016

From @drforr

Given the following (somewhat unusual) file layout​:

-- lib/Program.pm6 --
use Vector; # included in lib/Java
class Program { }
-- cut here --

-- lib/Java/Vector.pm6 --
use String; # Included in lib/Java
class Vector { }
-- cut here --

-- lib/Java/String.pm6 --
class String { }
-- cut here --

invoke with​:

perl6 -c -Ilib -Ilib/Java lib/Program.pm6

Resolution order *should* go something like this (though I'm aware that
@​INC is an old-fashioned notion)​:

read lib/Program.pm, attempt to resolve Vector.
readdir lib/, find no Vector.pm or .pm6
readdir lib/Java, find Vector.pm6
Read lib/Java/Vector.pm6, attempt to resolve String.
readdir lib/, find no String.pm or .pm6
readdir lib/Java, find String.pm6
Compile.

I'd accept OOM or looping (I've seen both behaviors while playing with
this) if I were foolish enough to create mutually-recursive includes,
although I would be surprised. There is no recursion, mutual or
otherwise, going on here though. lib/Java is a subdirectory of lib/ and
I'm well aware that could be playing havoc with file includes. I'm also
aware that ordinarily lib/Java/Vector.pm6 would contain a class called
'class Java​::Vector { }', but I wanted to experiment with a slightly
different kind of include style and ran across what appears to me to be
a quirk.

@p6rt p6rt added the perf label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant