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

temp %*ENV bug #4676

Closed
p6rt opened this issue Oct 25, 2015 · 8 comments
Closed

temp %*ENV bug #4676

p6rt opened this issue Oct 25, 2015 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Oct 25, 2015

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

Searchable as RT126447$

@p6rt
Copy link
Author

p6rt commented Oct 25, 2015

From @skaji

perl6 -v
This is perl6 version 2015.10-19-gd192f1c built on MoarVM version 2015.10

perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" }'
Cannot unbox a type object
  in block <unit> at -e​:1

@p6rt
Copy link
Author

p6rt commented Oct 25, 2015

From @lizmat

Fixed with b0b2489a2cff7b56d61e8e , tests needed!

On 25 Oct 2015, at 11​:49, Shoichi Kaji (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Shoichi Kaji
# Please include the string​: [perl #​126447]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126447 >

perl6 -v
This is perl6 version 2015.10-19-gd192f1c built on MoarVM version 2015.10

perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" }'
Cannot unbox a type object
in block <unit> at -e​:1

@p6rt
Copy link
Author

p6rt commented Oct 25, 2015

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

@p6rt
Copy link
Author

p6rt commented Oct 26, 2015

From @skaji

Thank you for your quick fix!

It works, but a warning is emitted.

$ perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" }'
Use of uninitialized value %ENV of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things,
if needed. in block at -e​:1
Applications System bin etc net sbin var

2015-10-25 23​:32 GMT+09​:00 Elizabeth Mattijsen via RT
<perl6-bugs-followup@​perl.org>​:

Fixed with b0b2489a2cff7b56d61e8e , tests needed!

On 25 Oct 2015, at 11​:49, Shoichi Kaji (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Shoichi Kaji
# Please include the string​: [perl #​126447]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126447 >

perl6 -v
This is perl6 version 2015.10-19-gd192f1c built on MoarVM version 2015.10

perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" }'
Cannot unbox a type object
in block <unit> at -e​:1

@p6rt
Copy link
Author

p6rt commented Dec 12, 2015

From @LLFourn

I managed to golf this a bit​:

perl6 -e '{ temp %*ENV<FOO> = "1" }; say %*ENV<FOO>​:exists # True

That should be False IMO. The value at <FOO> isn't 1, looks like Any from
p6, but I think at a lower level it's holding something nasty that trips up
nqp.

But this warning is not just caused by this example it's all over the place​:

https://rt.perl.org/Public/Bug/Display.html?id=126880
https://rt.perl.org/Public/Bug/Display.html?id=126840

in #​126880 it's caused by "RAKUDO_PRECOMP_DIST" key in ENV seemingly
leaking out of compile time (but not taking it's value wih it). temp isn't
used there.

On Tue, Oct 27, 2015 at 2​:24 AM Shoichi Kaji <skaji@​outlook.com> wrote​:

Thank you for your quick fix!

It works, but a warning is emitted.

$ perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" }'
Use of uninitialized value %ENV of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things,
if needed. in block at -e​:1
Applications System bin etc net sbin var

2015-10-25 23​:32 GMT+09​:00 Elizabeth Mattijsen via RT
<perl6-bugs-followup@​perl.org>​:

Fixed with b0b2489a2cff7b56d61e8e , tests needed!

On 25 Oct 2015, at 11​:49, Shoichi Kaji (via RT) <
perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Shoichi Kaji
# Please include the string​: [perl #​126447]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126447 >

perl6 -v
This is perl6 version 2015.10-19-gd192f1c built on MoarVM version
2015.10

perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls"
}'
Cannot unbox a type object
in block <unit> at -e​:1

@p6rt
Copy link
Author

p6rt commented Dec 13, 2015

From @LLFourn

tests for the general case of { temp %hash<key-doesnt-exist> = 42 }
restoring non-existence after temp exit​:

Raku/roast@9977e56

On Sat, Dec 12, 2015 at 9​:07 PM Lloyd Fournier <lloyd.fourn@​gmail.com>
wrote​:

I managed to golf this a bit​:

perl6 -e '{ temp %*ENV<FOO> = "1" }; say %*ENV<FOO>​:exists # True

That should be False IMO. The value at <FOO> isn't 1, looks like Any from
p6, but I think at a lower level it's holding something nasty that trips up
nqp.

But this warning is not just caused by this example it's all over the
place​:

https://rt.perl.org/Public/Bug/Display.html?id=126880
https://rt.perl.org/Public/Bug/Display.html?id=126840

in #​126880 it's caused by "RAKUDO_PRECOMP_DIST" key in ENV seemingly
leaking out of compile time (but not taking it's value wih it). temp isn't
used there.

On Tue, Oct 27, 2015 at 2​:24 AM Shoichi Kaji <skaji@​outlook.com> wrote​:

Thank you for your quick fix!

It works, but a warning is emitted.

$ perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls"
}'
Use of uninitialized value %ENV of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things,
if needed. in block at -e​:1
Applications System bin etc net sbin var

2015-10-25 23​:32 GMT+09​:00 Elizabeth Mattijsen via RT
<perl6-bugs-followup@​perl.org>​:

Fixed with b0b2489a2cff7b56d61e8e , tests needed!

On 25 Oct 2015, at 11​:49, Shoichi Kaji (via RT) <
perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Shoichi Kaji
# Please include the string​: [perl #​126447]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126447 >

perl6 -v
This is perl6 version 2015.10-19-gd192f1c built on MoarVM version
2015.10

perl6 -e '{ temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run
"ls" }'
Cannot unbox a type object
in block <unit> at -e​:1

@p6rt
Copy link
Author

p6rt commented Jul 5, 2016

From @zoffixznet

Since the issue evolved a couple of times since this ticket was originally created, it's a bit hard to follow what is still outstanding.

I separated the currently still-buggy part into a separate ticket​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128544

@p6rt
Copy link
Author

p6rt commented Jul 5, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant