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

Error on eqv with lazy Lists #6533

Closed
p6rt opened this issue Sep 18, 2017 · 7 comments
Closed

Error on eqv with lazy Lists #6533

p6rt opened this issue Sep 18, 2017 · 7 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Sep 18, 2017

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

Searchable as RT132117$

@p6rt
Copy link
Author

p6rt commented Sep 18, 2017

From @zoffixznet

If you `eqv` two lazy Seqs, you get a useful error​:

  m​: say (lazy 1,) eqv (lazy 1,)
  rakudo-moar 9190a3​: OUTPUT​: «Cannot eqv lazy Sequences␤ in block <unit> at <tmp> line 1␤␤»

But error is poor with lazy Lists​:

  m​: say (lazy 1,).List eqv (lazy 1,).List
  rakudo-moar 9190a3​: OUTPUT​: «This type cannot unbox to a native integer​: P6opaque, Failure␤ in block <unit> at <tmp> line 1␤␤»

@p6rt
Copy link
Author

p6rt commented Sep 18, 2017

From @lizmat

Fixed with 66c2d05f29 , tests need attention in S03-operators/eqv.t

On 18 Sep 2017, at 14​:51, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

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

If you `eqv` two lazy Seqs, you get a useful error​:

m​: say (lazy 1,) eqv (lazy 1,)
rakudo-moar 9190a3​: OUTPUT​: «Cannot eqv lazy Sequences␤ in block <unit> at <tmp> line 1␤␤»

But error is poor with lazy Lists​:

m​: say (lazy 1,).List eqv (lazy 1,).List
rakudo-moar 9190a3​: OUTPUT​: «This type cannot unbox to a native integer​: P6opaque, Failure␤ in block <unit> at <tmp> line 1␤␤»

@p6rt
Copy link
Author

p6rt commented Sep 18, 2017

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

@p6rt
Copy link
Author

p6rt commented Sep 18, 2017

From @zoffixznet

On Mon, 18 Sep 2017 07​:44​:16 -0700, elizabeth wrote​:

Fixed with 66c2d05f29 , tests need attention in S03-operators/eqv.t

On 18 Sep 2017, at 14​:51, Zoffix Znet (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

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

If you `eqv` two lazy Seqs, you get a useful error​:

m​: say (lazy 1,) eqv (lazy 1,)
rakudo-moar 9190a3​: OUTPUT​: «Cannot eqv lazy Sequences␤ in block
<unit> at <tmp> line 1␤␤»

But error is poor with lazy Lists​:

m​: say (lazy 1,).List eqv (lazy 1,).List
rakudo-moar 9190a3​: OUTPUT​: «This type cannot unbox to a native
integer​: P6opaque, Failure␤ in block <unit> at <tmp> line 1␤␤»

Some comments on the failing tests​: https://irclog.perlgeek.de/perl6-dev/2017-09-18#i_15181348

We could make `eqv` return False even for lazy args when we can determine the types differ (or one arg is lazy and the other isn't).

The test themselves are just coverage tests and aren't part of the released language, so they can be amended if needed.

@p6rt
Copy link
Author

p6rt commented Sep 18, 2017

From @zoffixznet

Another commit shipped out for this ticket​: rakudo/rakudo@48a84d6aff

@p6rt
Copy link
Author

p6rt commented Sep 19, 2017

From @zoffixznet

On Mon, 18 Sep 2017 09​:22​:44 -0700, cpan@​zoffix.com wrote​:

Another commit shipped out for this ticket​:
rakudo/rakudo@48a84d6aff

Made it throw typed exceptions in rakudo/rakudo@bb45791c5d
Tests for the whole thing in Raku/roast@66c13e9402

@p6rt p6rt closed this as completed Sep 19, 2017
@p6rt
Copy link
Author

p6rt commented Sep 19, 2017

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant