-
Notifications
You must be signed in to change notification settings - Fork 1
JSON::Tiny tests output bad text on latest build #6440
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
Comments
From @jdvI updated to: [jdv@localhost ~]$ perl6 -v from a build from last weekend or so and the json tiny tests failed and # Failed test 'JSON string «["̥̞ͫͩ̉̎͊ỏ̟͙̞̻̻̹̹r̵̨͇̫̦̺̮̼ͭ,̷̧̬̲͈̤̤̅̉͛ͫ͠ and then this happens: Aug 10 14:29:48 localhost.localdomain gnome-terminal-server[3375]: ** which is the log version of "all my gnome-terminal instances just |
@jdv - Status changed from 'new' to 'deleted' |
@jdv - Status changed from 'deleted' to 'open' |
From @AlexDanielIt was bisected to rakudo/rakudo@f590863 Example (before and after): https://gist.github.com/Whateverable/2a9088ddcff37fd6f748b77ba3339af2 On 2017-08-10 14:54:24, jdv79 wrote:
|
From @moritzBackground of JSON::Tiny's weird code: JSON allows you to have quoted strings, and these strings can start with basically any Unicode codepoint, including combining characters. JSON::Tiny failed to parse these strings, because Perl 6 combines the opening quote with the following (combining) codepoint to a single grapheme. Since regexes don't have a codepoint mode (which would be appropriate for parsing JSON), the worakround was to parse the opening quote with :ignoremark. In the old rakudo version, the regex / (:ignoremark '"') / parsed the quote plus combining character(s) in a single capture, and then transfered the combining characters to the start of the quoted string in the action method. I would expect the following three lines to all print "True\n": say so qq{"\c[ZERO WIDTH JOINER]a"} ~~ rx:ignoremark/^ '"' /; If somebody objects, please then clarify what you think the proper way is to parse JSON with a Perl 6 grammar. |
From @samcvI have fixed this as of this MoarVM commit: Full explaination in the commit description. Thanks a lot for reporting this bug :) |
@samcv - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#131881 (status was 'resolved')
Searchable as RT131881$
The text was updated successfully, but these errors were encountered: