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

The Supply.grep Supply reverts to the original Supply on a subsequent .grep #5060

Closed
p6rt opened this issue Jan 17, 2016 · 3 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 17, 2016

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

Searchable as RT127297$

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @jonathanstowe

If the second grep was working on the result of the first this would not output anything​:

install/bin/perl6 -e 'Supply.from-list(<foo bar baz>).grep(/foo/).grep(/baz/).tap({say $_})'
baz

Instead it outputs "baz" which is a valid value from the original Supply.

Having bisected this was definitely introduced with a8231f14b2d5400e0653aac453496e00318142c5 which was where the majority of the changes to supplies went in.

It is still present in

This is Rakudo version 2015.12-111-gfec0619 built on MoarVM version 2015.12
implementing Perl 6.c

which is where I detected it, and HEAD as of today.

I noticed this first in trying to fix Net​::AMQP in the ecosystem, here it greps for AMQP frames which represent methods and reformats them to a hash with the method as a key, a subsequent attempt to further grep the resulting supply is fatal because it reverts to being raw AMQP frames as per the original supply.

I can add a test to roast if necessary.

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @jonathanstowe

Added a test in Raku/roast@696d50a932

It is fixed by rakudo 770d1097380822808e4597ce42d0b750dbd4909b

On Sun Jan 17 05​:10​:22 2016, jns+bc@​gellyfish.co.uk wrote​:

If the second grep was working on the result of the first this would
not output anything​:

install/bin/perl6 -e 'Supply.from-list(<foo bar
baz>).grep(/foo/).grep(/baz/).tap({say $_})'
baz

Instead it outputs "baz" which is a valid value from the original
Supply.

Having bisected this was definitely introduced with
a8231f14b2d5400e0653aac453496e00318142c5 which was where the majority
of the changes to supplies went in.

It is still present in

This is Rakudo version 2015.12-111-gfec0619 built on MoarVM version
2015.12
implementing Perl 6.c

which is where I detected it, and HEAD as of today.

I noticed this first in trying to fix Net​::AMQP in the ecosystem, here
it greps for AMQP frames which represent methods and reformats them to
a hash with the method as a key, a subsequent attempt to further grep
the resulting supply is fatal because it reverts to being raw AMQP
frames as per the original supply.

I can add a test to roast if necessary.

@p6rt
Copy link
Author

p6rt commented Jan 18, 2016

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

@p6rt p6rt closed this as completed Jan 18, 2016
@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