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

Bad failure mode when macro returns AST.new in Rakudo #2952

Closed
p6rt opened this issue Oct 27, 2012 · 7 comments
Closed

Bad failure mode when macro returns AST.new in Rakudo #2952

p6rt opened this issue Oct 27, 2012 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Oct 27, 2012

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

Searchable as RT115506$

@p6rt
Copy link
Author

p6rt commented Oct 27, 2012

From @masak

<diakopter> r​: macro marco { AST.new }; marco
<p6eval> rakudo 6859fb​: OUTPUT«===SORRY!===␤Error while compiling
block : Error while compiling op call​: Error while compiling block :
Error while compiling block : Unknown QAST node type Any␤»
<diakopter> :>
<masak> diakopter​: fair point.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Nov 3, 2012

From @masak

On Sat Oct 27 10​:45​:32 2012, masak wrote​:

<diakopter> r​: macro marco { AST.new }; marco
<p6eval> rakudo 6859fb​: OUTPUT«===SORRY!===␤Error while compiling
block : Error while compiling op call​: Error while compiling block :
Error while compiling block : Unknown QAST node type Any␤»
<diakopter> :>
<masak> diakopter​: fair point.
* masak submits rakudobug

Fixed as of 026880​:

$ nom -e 'macro pathological { AST.new }; pathological(); say "alive"'
alive

Tagging testneeded.

@p6rt
Copy link
Author

p6rt commented Nov 3, 2012

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 14, 2012

From @coke

On Sat Nov 03 09​:17​:06 2012, masak wrote​:

On Sat Oct 27 10​:45​:32 2012, masak wrote​:

<diakopter> r​: macro marco { AST.new }; marco
<p6eval> rakudo 6859fb​: OUTPUT«===SORRY!===␤Error while compiling
block : Error while compiling op call​: Error while compiling block :
Error while compiling block : Unknown QAST node type Any␤»
<diakopter> :>
<masak> diakopter​: fair point.
* masak submits rakudobug

Fixed as of 026880​:

$ nom -e 'macro pathological { AST.new }; pathological(); say "alive"'
alive

Tagging testneeded.

I was unable to test this​:

#RT #​115506
eval_lives_ok
  "macro pathological { AST.new }; pathological();",
  "macro returning AST.new doesn't blow up";

fails with​:

prove -v -e t/fudgeandrun t/spec/S06-macros/errors.tt/spec/S06-macros/errors.t ..
1..1
not ok 1 - macro returning AST.new doesn't blow up
# Error​: Missing block
# Looks like you failed 1 tests of 1

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Nov 14, 2012

From @masak

coke (>)​:

I was unable to test this​:

#RT #​115506
eval_lives_ok
"macro pathological { AST.new }; pathological();",
"macro returning AST.new doesn't blow up";

fails with​:

prove -v -e t/fudgeandrun t/spec/S06-macros/errors.tt/spec/S06-
macros/errors.t ..
1..1
not ok 1 - macro returning AST.new doesn't blow up
# Error​: Missing block
# Looks like you failed 1 tests of 1

Double-quoted "" strings interpolate {} blocks. So I don't think the
first argument to eval_lives_ok means what you think it means. I've done
the same thinko myself a number of times.

@p6rt
Copy link
Author

p6rt commented Nov 14, 2012

From @coke

On Wed Nov 14 05​:24​:29 2012, masak wrote​:

coke (>)​:

I was unable to test this​:

#RT #​115506
eval_lives_ok
"macro pathological { AST.new }; pathological();",
"macro returning AST.new doesn't blow up";

fails with​:

prove -v -e t/fudgeandrun t/spec/S06-macros/errors.tt/spec/S06-
macros/errors.t ..
1..1
not ok 1 - macro returning AST.new doesn't blow up
# Error​: Missing block
# Looks like you failed 1 tests of 1

Double-quoted "" strings interpolate {} blocks. So I don't think the
first argument to eval_lives_ok means what you think it means. I've done
the same thinko myself a number of times.

*facepalm*

Created new test file, S06-macros/errors.t, rakudo now runs that file.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Nov 14, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant