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

please 'use experimental :pack' even if code does exactly that #2111

Closed
AlexDaniel opened this issue Jul 22, 2018 · 5 comments
Closed

please 'use experimental :pack' even if code does exactly that #2111

AlexDaniel opened this issue Jul 22, 2018 · 5 comments
Assignees
Labels
regression Issue did not exist previously

Comments

@AlexDaniel
Copy link
Contributor

Originally reported by @thundergnat++, confirmed by @dogbert17++, golfed by @ugexe++:

$ perl6 -e 'package Foo { use experimental :pack; sub go() is export { "".encode.unpack("*") }; }; import Foo; go()'
Use of the 'unpack' method is experimental; please 'use experimental :pack'
  in sub go at -e line 1
  in block <unit> at -e line 1

Original report in a gist: https://gist.github.com/thundergnat/057aef48c0612905aa88b7553cc3323c

Was working fine on 2018.06:

<AlexDaniel> c: 2018.06,HEAD package Foo { use experimental :pack; sub go() is export { "".encode.unpack("*") }; }; import Foo; go()
<committable6> AlexDaniel, ¦2018.06: «» ¦HEAD(cb2ea93): «Use of the 'unpack' method is experimental; please 'use experimental :pack'␤ in sub go at /tmp/DtKIwcN2IU line 1␤ in block <unit> at /tmp/DtKIwcN2IU line 1␤␤ «exit code = 1»»

⚠⚠⚠ Bisected: (2018-07-18) a847abe

I assigned some people who should know more about it, but anyone please feel free to work on this.

@AlexDaniel AlexDaniel added regression Issue did not exist previously BLOCKER Preventing the next release of rakudo, or just needing attention before the release labels Jul 22, 2018
@lizmat
Copy link
Contributor

lizmat commented Jul 23, 2018

It appears it's the import that checks for whether unpack is allowed or not. So at least a workaround is the move the use experimental :pack to the scope of the import:

package Foo { sub go() is export { "".encode.unpack("*") }; }; use experimental :pack; import Foo; go()

Continuing ways of fixing this.

EDIT: just having it in the outer scope, is probably why this workaround works.

@jnthn
Copy link
Member

jnthn commented Jul 23, 2018

Fixed the getlexcaller regression that caused this in MoarVM/MoarVM@ba906c4297

@AlexDaniel AlexDaniel removed the BLOCKER Preventing the next release of rakudo, or just needing attention before the release label Jul 23, 2018
@lizmat
Copy link
Contributor

lizmat commented Jul 23, 2018

Test added with Raku/roast@3129a4a708 , can be closed afaiac

@AlexDaniel
Copy link
Contributor Author

@lizmat why a roast test for an experimental feature?

@lizmat
Copy link
Contributor

lizmat commented Jul 23, 2018

FWIW, I just looked to "use experimental :pack' in t/spec and added the test there. It was not the only one. So, if this needs to be moved, many more will need to be moved.

@lizmat lizmat closed this as completed Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

3 participants