Skip Menu |
 

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 24790
Status: rejected
Priority: 0/
Queue: YAML-Syck

People
Owner: TODDR [...] cpan.org
Requestors: audreyt [...] audreyt.org
david.pitt [...] nab.com.au
fred [...] thomascorner.com
why [...] whytheluckystiff.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: cpan [...] audreyt.org
Subject: YAML::Syck incompatibility with YAML.pm (comma-separated lists)
Date: Mon, 5 Feb 2007 16:43:16 +1100
To: bug-YAML-Syck [...] rt.cpan.org
From: David.Pitt [...] nab.com.au
Download (untitled) / with headers
text/plain 3.2k
Hi Audrey, Great work with YAML::Syck, we have found it invaluable. I discovered an anomaly between YAML::Syck and YAML. Consider the following YAML statement, where there is no space after the comma in a comma-separated list: FS : [Mark McGwire,65] This is interpreted as follows: YAML: FS => [ 'Mark McGwire', '65' ] YAML::Syck: FS => [ 'Mark McGwire,65' ] Adding a space afer the comma causes YAML::Syck to interpret the list correctly. YAML::Syck requires a 'comma-and-space separated list' within square brackets, whereas YAML requires a 'comma-separated list'. My reading of the standard http://yaml.org/spec/current.html (2.1 Collections) - "The flow sequence is written as a comma separated list within square brackets" - indicates that the YAML treats this correctly, and YAML::Syck treats it incorrectly. Environment: YAML-Syck-0.82 (also 0.67) YAML: 0.62 perl 5.8.8 built for sun4-solaris-64 SunOS tdevs183 5.8 Generic_117350-41 sun4u sparc SUNW,Netra-T12 Test case: #!/usr/local/bin/perl use strict; use warnings; use YAML(); use YAML::Syck(); use Test::More tests => 2; use Test::Differences; # http://yaml.org/spec/current.html 2.1 Collections my $stream = <<EoY; FS : [Mark McGwire,65] EoY my $expected = { FS => [ 'Mark McGwire', '65' ] }; eq_or_diff(YAML::Load($stream), $expected, 'YAML'); eq_or_diff(YAML::Syck::Load($stream), $expected, 'YAML::Syck'); Output: 1..2 ok 1 - YAML not ok 2 - YAML::Syck # Failed test 'YAML::Syck' # in ./bug01.pl at line 21. # +----+-----------------------+----+---------------------+ # | Elt|Got | Elt|Expected | # +----+-----------------------+----+---------------------+ # | 0|{ | 0|{ | # | 1| FS => [ | 1| FS => [ | # * 2| 'Mark McGwire,65' * 2| 'Mark McGwire', * # | | * 3| '65' * # | 3| ] | 4| ] | # | 4|} | 5|} | # +----+-----------------------+----+---------------------+ # Looks like you failed 1 test of 2. Regards, David Pitt | Enterprise Services Technology | National Australia Bank Limited Phone +61 3 8641 2014 | Email david.pitt@nab.com.au | Level 26, 500 Bourke Street, Melbourne National Australia Bank Ltd - ABN 12 004 044 937 This email may contain confidential information. If you are not the intended recipient, please immediately notify us at postmaster@nab.com.au or by replying to the sender, and then destroy all copies of this email. Except where this email indicates otherwise, views expressed in this email are those of the sender and not of National Australia Bank Ltd. Advice in this email does not take account of your objectives, financial situation, or needs. It is important for you to consider these matters and, if the e-mail refers to a product(s), you should read the relevant Product Disclosure Statement(s)/other disclosure document(s) before making any decisions. If you do not want email marketing from us in future, forward this email with "unsubscribe" in the subject line to Unsubscriptions@nab.com.au in order to stop marketing emails from this sender. National Australia Bank Ltd does not represent that this email is free of errors, viruses or interference.
CC: bug-YAML-Syck [...] rt.cpan.org, why [...] whytheluckystiff.net
Subject: Re: YAML::Syck incompatibility with YAML.pm (comma-separated lists)
Date: Wed, 28 Feb 2007 03:29:55 +0800
To: David.Pitt [...] nab.com.au
From: Audrey Tang <audreyt [...] audreyt.org>
Download (untitled) / with headers
text/plain 1.3k
在 Feb 5, 2007 1:43 PM 時,David.Pitt@nab.com.au 寫到: Show quoted text
> Hi Audrey, > > Great work with YAML::Syck, we have found it invaluable. I > discovered an > anomaly between YAML::Syck and YAML. Consider the following YAML > statement, > where there is no space after the comma in a comma-separated list: > > FS : [Mark McGwire,65] > > This is interpreted as follows: > > YAML: FS => [ 'Mark McGwire', '65' ] > YAML::Syck: FS => [ 'Mark McGwire,65' ] > > Adding a space afer the comma causes YAML::Syck to interpret the list > correctly. YAML::Syck requires a 'comma-and-space separated list' > within > square brackets, whereas YAML requires a 'comma-separated list'. My > reading > of the standard http://yaml.org/spec/current.html (2.1 Collections) > - "The > flow sequence is written as a comma separated list within square > brackets" > - indicates that the YAML treats this correctly, and YAML::Syck > treats it > incorrectly.
This is a Syck issue, not a Perl binding issue, so I'm Cc'ing upstream (Why the lucky stiff) instead. Why: It seems that the two cases below ought to result in ['x', 'y', 'z'], according to both YAML 1.0 and 1.1 spec: irb(main):009:0> YAML.load('--- [x,y,z]') => ["x,y,z"] irb(main):010:0> YAML.load('--- [x, y, z]') => ["x", "y", "z"] Can you take a look at what might be wrong? Thanks, Audrey
CC: David.Pitt [...] nab.com.au, bug-YAML-Syck [...] rt.cpan.org
Subject: Re: YAML::Syck incompatibility with YAML.pm (comma-separated lists)
Date: Tue, 27 Feb 2007 15:03:21 -0600
To: Audrey Tang <audreyt [...] audreyt.org>
From: why the lucky stiff <why [...] whytheluckystiff.net>
Download (untitled) / with headers
text/plain 1.1k
On Wed, Feb 28, 2007 at 03:29:55AM +0800, Audrey Tang wrote: Show quoted text
> Why: It seems that the two cases below ought to result in ['x', 'y', > 'z'], according to both YAML 1.0 and 1.1 spec: > > irb(main):009:0> YAML.load('--- [x,y,z]') > => ["x,y,z"] > irb(main):010:0> YAML.load('--- [x, y, z]') > => ["x", "y", "z"] > > Can you take a look at what might be wrong?
I'm not so sure. See, the thing is: Syck only supports YAML 1.0 presently. From the 1.0 spec[1]: [87] c-c-flow-seq-value(n) ::= "[" s-s-optional(n) ( ns-ns-flow-seq-entry(n) s-s-optional(n) ( "," s-s-required(n) ns-ns-flow-seq-entry(n) s-s-optional(n) )* )? The s-s-required(n) means a space is needed after the comma. I wish Syck was current with YAML 1.1. I'm sure it's time will come around soon enough. Signed in a violet ink with a small picture of grapes the end, _why [1] http://yaml.org/spec/history/2004-01-29/2004-01-29.html#c-c-flow-seq-value(n)
CC: David.Pitt [...] nab.com.au, bug-YAML-Syck [...] rt.cpan.org
Subject: Re: YAML::Syck incompatibility with YAML.pm (comma-separated lists)
Date: Thu, 22 Mar 2007 03:28:53 +0800
To: why the lucky stiff <why [...] whytheluckystiff.net>
From: Audrey Tang <audreyt [...] audreyt.org>
在 Feb 28, 2007 5:03 AM 時,why the lucky stiff 寫到: Show quoted text
> On Wed, Feb 28, 2007 at 03:29:55AM +0800, Audrey Tang wrote:
>> Why: It seems that the two cases below ought to result in ['x', 'y', >> 'z'], according to both YAML 1.0 and 1.1 spec: >> >> irb(main):009:0> YAML.load('--- [x,y,z]') >> => ["x,y,z"] >> irb(main):010:0> YAML.load('--- [x, y, z]') >> => ["x", "y", "z"] >> >> Can you take a look at what might be wrong?
> > I'm not so sure. See, the thing is: Syck only supports YAML 1.0 > presently. From the 1.0 spec[1]: > > [87] c-c-flow-seq-value(n) ::= "[" > s-s-optional(n) > ( ns-ns-flow-seq-entry(n) > s-s-optional(n) > ( "," s-s-required(n) > ns-ns-flow-seq-entry(n) > s-s-optional(n) )* )?
Why, indeed, you're correct. :-) Thanks, Audrey
Download (untitled) / with headers
text/plain 1.1k
Wed Mar 21 15:29:46 2007 Audrey Tang - Ticket created [Reply] CC: David.Pitt@nab.com.au, bug-YAML-Syck@rt.cpan.org Subject: Re: YAML::Syck incompatibility with YAML.pm (comma-separated lists) Date: Thu, 22 Mar 2007 03:28:53 +0800 To: why the lucky stiff <why@whytheluckystiff.net> From: Audrey Tang <audreyt@audreyt.org> Download (untitled) / with headers text/plain 1k 在 Feb 28, 2007 5:03 AM 時,why the lucky stiff 寫到: Show quoted text
> On Wed, Feb 28, 2007 at 03:29:55AM +0800, Audrey Tang wrote:
>> Why: It seems that the two cases below ought to result in ['x', 'y', >> 'z'], according to both YAML 1.0 and 1.1 spec: >> >> irb(main):009:0> YAML.load('--- [x,y,z]') >> => ["x,y,z"] >> irb(main):010:0> YAML.load('--- [x, y, z]') >> => ["x", "y", "z"] >> >> Can you take a look at what might be wrong?
> > I'm not so sure. See, the thing is: Syck only supports YAML 1.0 > presently. From the 1.0 spec[1]: > > [87] c-c-flow-seq-value(n) ::= "[" > s-s-optional(n) > ( ns-ns-flow-seq-entry(n) > s-s-optional(n) > ( "," s-s-required(n) > ns-ns-flow-seq-entry(n) > s-s-optional(n) )* )?
Why, indeed, you're correct. :-) Thanks, Audrey
RT-Send-CC: cpan [...] audreyt.org, David.Pitt [...] nab.com.au
As I read this exchange, this ticket is a Won't fix as it's not part of the 1.1 spec.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.