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

Precompilation bug with predefined dynamic variables #4214

Closed
p6rt opened this issue May 3, 2015 · 5 comments
Closed

Precompilation bug with predefined dynamic variables #4214

p6rt opened this issue May 3, 2015 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 3, 2015

Migrated from rt.perl.org#125090 (status was 'resolved')

Searchable as RT125090$

@p6rt
Copy link
Author

p6rt commented May 3, 2015

From cygx@cpan.org

Example code​:

  $ echo 'BEGIN $*KERNEL;' > Bug.pm

  $ perl6 --target=mbc --output=Bug.pm.moarvm Bug.pm

  $ perl6 -I. -MBug -e 'say 42'
  write string requires an object with REPR MVMOSHandle
  in method print at src/gen/m-CORE.setting​:17832
  in sub say at src/gen/m-CORE.setting​:18592
  in block <unit> at -e​:1

  $ perl6 -I. -MBug -e 'use nqp; nqp​::say($*OUT.gist)'
  IO​::Handle<<STDOUT>>(closed)

Also triggered by $*DISTRO, but eg not $*VM.

@p6rt
Copy link
Author

p6rt commented May 13, 2015

From @jonathanstowe

This can be seen in the wild in the module System​::Passwd where $*KERNEL and $*DISTRO are referenced in the body of the module (I sent a patch to do this lazily to workaround it.)

@p6rt
Copy link
Author

p6rt commented May 14, 2015

From @jnthn

On Sun May 03 03​:44​:45 2015, cygx@​cpan.org wrote​:

Example code​:

$ echo 'BEGIN $\*KERNEL;' > Bug\.pm

$ perl6 \-\-target=mbc \-\-output=Bug\.pm\.moarvm Bug\.pm

$ perl6 \-I\. \-MBug \-e 'say 42'
write string requires an object with REPR MVMOSHandle
  in method print at src/gen/m\-CORE\.setting&#8203;:17832
  in sub say at src/gen/m\-CORE\.setting&#8203;:18592
  in block \<unit> at \-e&#8203;:1

$ perl6 \-I\. \-MBug \-e 'use nqp; nqp&#8203;::say\($\*OUT\.gist\)'
IO&#8203;::Handle\<\<STDOUT>>\(closed\)

Also triggered by $*DISTRO, but eg not $*VM.

Fixed, plus added tests in S10-packages/precompilation.t.

@p6rt
Copy link
Author

p6rt commented May 14, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed May 14, 2015
@p6rt
Copy link
Author

p6rt commented May 14, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt added the Bug 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