That's a little deep, don't you think?

9 views
Skip to first unread message

Phlip

unread,
Jun 20, 2012, 9:35:03 PM6/20/12
to wron...@googlegroups.com
When this fails assert{ 'fl...@example.com' == mail[:to].to_s } ...

I get a huge splat of recursive verbiage, like this:

#<Mail::AddressList:0x7ff13afe4420
@address_nodes=
[SyntaxNode+Address1+AddrSpec0 offset=0,
"mi...@example.com" (local_part,domain,dig_comments,comments):
SyntaxNode+LocalDotAtom0 offset=0, "mike" (local_dot_atom_text):
SyntaxNode+CFWS1 offset=0, "":
SyntaxNode offset=0, ""
SyntaxNode offset=0, ""
SyntaxNode offset=0, "mike":
SyntaxNode+LocalDotAtomText0 offset=0, "mike" (domain_text):
SyntaxNode offset=0, ""
SyntaxNode offset=0, "mike":
SyntaxNode offset=0, "m"
SyntaxNode offset=1, "i"
SyntaxNode offset=2, "k"
SyntaxNode offset=3, "e"

My version of the diagnostic formatter stops at string primitives, and
does not exhaust their glory into every single token.

(Also, in my exalted opinion, and assertion that _needs_ to see every
single token, such as for UTF-8 escape codes, should assert them
directly, forcing the diagnostic to go that deep.)

Can we get diagnostics with less verbiage & more relevance?

--
  Phlip
  http://c2.com/cgi/wiki?ZeekLand

mschuerig

unread,
Jun 23, 2012, 6:07:36 AM6/23/12
to wron...@googlegroups.com


On Thursday, June 21, 2012 3:35:03 AM UTC+2, Phlip wrote:

Can we get diagnostics with less verbiage & more relevance?


Yes, please. I haven't looked at the implementation of wrong at all, but I suppose it would be possible to configurably limit the depth to which objects are traversed.

Michael
Reply all
Reply to author
Forward
0 new messages