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

LTA Error on is cached trait without use experimental #4878

Closed
p6rt opened this issue Dec 16, 2015 · 5 comments
Closed

LTA Error on is cached trait without use experimental #4878

p6rt opened this issue Dec 16, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 16, 2015

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

Searchable as RT126936$

@p6rt
Copy link
Author

p6rt commented Dec 16, 2015

From @zoffixznet

When `is cached` trait is used without declaring `use experimental :cached` the error message does not mention the fact that experimental is missing, but it should​:

<ZoffixW> m​: sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
<camelia> rakudo-moar a54024​: OUTPUT«===SORRY!=== Error while compiling /tmp/aGuHkHSdB6␤Can't use unknown trait 'is cached' in a sub declaration.␤at /tmp/aGuHkHSdB6​:1␤ expecting any of​:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ pure default DEPRECATED i…»

Even though it does mention it for macros​:
<ZoffixW> m​: macro x ($text){}
<camelia> rakudo-moar a54024​: OUTPUT«===SORRY!=== Error while compiling /tmp/C1ZA2QCies␤Use of macros is experimental; please 'use experimental :macros'␤at /tmp/C1ZA2QCies​:1␤------> macro⏏ x ($text){}␤»

Original discussion here​: http://irclog.perlgeek.de/perl6/2015-12-16#i_11729206

@p6rt
Copy link
Author

p6rt commented Dec 17, 2015

From @lizmat

On 16 Dec 2015, at 20​:52, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

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

When `is cached` trait is used without declaring `use experimental :cached` the error message does not mention the fact that experimental is missing, but it should​:

<ZoffixW> m​: sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
<camelia> rakudo-moar a54024​: OUTPUT«===SORRY!=== Error while compiling /tmp/aGuHkHSdB6␤Can't use unknown trait 'is cached' in a sub declaration.␤at /tmp/aGuHkHSdB6​:1␤ expecting any of​:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ pure default DEPRECATED i…»

Even though it does mention it for macros​:
<ZoffixW> m​: macro x ($text){}
<camelia> rakudo-moar a54024​: OUTPUT«===SORRY!=== Error while compiling /tmp/C1ZA2QCies␤Use of macros is experimental; please 'use experimental :macros'␤at /tmp/C1ZA2QCies​:1␤------> macro⏏ x ($text){}␤»

Original discussion here​: http://irclog.perlgeek.de/perl6/2015-12-16#i_11729206

Fixed with 7188229344f93cf4b1eb , tests needed.

Liz

@p6rt
Copy link
Author

p6rt commented Dec 17, 2015

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

@p6rt
Copy link
Author

p6rt commented Apr 16, 2016

From @usev6

On Thu Dec 17 06​:37​:02 2015, elizabeth wrote​:

[...]

When `is cached` trait is used without declaring `use experimental
:cached` the error message does not mention the fact that
experimental is missing, but it should​:

Fixed with 7188229344f93cf4b1eb , tests needed.

I started to look where to put a test, but than I saw, that we don't have any tests for X​::Experimental. Thinking about it, such tests (or e.g. for X​::NYI) seem to be not very useful in roast. Firstly they had to be changed once something becomes non-experimental or fully implemented. And secondly they look more like implementation details than like language specification.

Therefore I'm closing this ticket as 'resolved' without adding tests. If you don't agree with my above reasoning, feel free to re-open the ticket and/or add tests.

@p6rt
Copy link
Author

p6rt commented Apr 16, 2016

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

@p6rt p6rt closed this as completed Apr 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant