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

use experimental :pack is ignored even if it is surely called #2173

Open
titsuki opened this issue Aug 4, 2018 · 2 comments
Open

use experimental :pack is ignored even if it is surely called #2173

titsuki opened this issue Aug 4, 2018 · 2 comments
Labels
experimental pack, macros, etc.

Comments

@titsuki
Copy link
Contributor

titsuki commented Aug 4, 2018

The Problem

See:
https://travis-ci.org/titsuki/p6-MeCab/jobs/406780390
https://github.com/titsuki/p6-MeCab/blob/0.0.6/lib/MeCab/Lattice.pm6#L3
https://github.com/titsuki/p6-MeCab/blob/0.0.6/lib/MeCab/Lattice.pm6#L169

Even if I surely call use experimental :pack, it still warns to use use experimental :pack and abends when I call unpack.

Expected Behavior

It doesn't cause any warns.

Actual Behavior

It causes an error and abends.

Steps to Reproduce

See:
https://github.com/titsuki/p6-MeCab/blob/0.0.6/t/02-lattice.t

All of the methods that calls multi method feature-constraint(Int $begin-pos, Int $end-pos, Str $feature) can cause errors.

Environment

  • Operating system: Ubuntu 14.04.5 LTS
  • Compiler version (perl6 -v): Rakudo version 2018.06-234-gcb2ea9328 built on MoarVM version 2018.06-304-g4d22fb9e7
@lizmat
Copy link
Contributor

lizmat commented Aug 4, 2018

This is probably a complication of the new frame walker logic that Jonathan implemented in Moar.

I have no current solution, but a possible workaround: could you try moving the use experimental :pack to the method in which you use the .unpack ? This would probably, longer term, also be more efficient as it would have to walk fewer frames to find out if it is ok to use .unpack.

There is also a P5pack module in the ecosystem that you might want to have a look at.

@titsuki
Copy link
Contributor Author

titsuki commented Aug 4, 2018

@lizmat thanks for your advice! I'll try it later.

@lucasbuchala lucasbuchala added the experimental pack, macros, etc. label Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental pack, macros, etc.
Projects
None yet
Development

No branches or pull requests

3 participants