Raku / Raku/whateverable

Quotable and “foo”

Open
#215 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

quotable testneeded
Dominant language
Raku
Stars
19
Forks
16
PR merge metrics
No merged PRs in 30d

Description

<Skarsnik> quotable6, foo

And it fails:

Cannot convert string to number: base-16 number must begin with valid digits or '.' in '�[32m:16<⏏�[31msers>�[0m' (indicated by ⏏�[0m)
  in block  at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 182
  in sub parse-string at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 98
  in sub parse-thing at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 326
  in sub parse-obj at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 244
  in sub parse-thing at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 330
  in sub parse-obj at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 244
  in sub parse-thing at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 330
  in sub parse-obj at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 244
  in sub parse-thing at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 330
  in sub from-json at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/98F5242383605103C50EA9EC60D04C2892781A7B (JSON::Fast) line 366
  in method paste at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/765692A23C5BB5A499385D53980470B2D4930869 (Pastebin::Gist) line 31
  in method upload at /home/bisectable/git/whateverable/lib/Whateverable.pm6 (Whateverable) line 456 (⚠ uncommitted)
  in method filter at /home/bisectable/git/whateverable/lib/Whateverable.pm6 (Whateverable) line 430 (⚠ uncommitted)
  in sub  at /home/bisectable/git/whateverable/lib/Whateverable.pm6 (Whateverable) line 69 (⚠ uncommitted)
  in block  at /home/bisectable/git/whateverable/lib/Whateverable.pm6 (Whateverable) line 472 (⚠ uncommitted)
  in block  at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/DFC5BCCD6AED9D84DA8A1F88FF8F423073F81CA9 (IRC::Client) line 341
  in block  at /home/bisectable/.rakudobrew/moar-nom/install/share/perl6/site/sources/DFC5BCCD6AED9D84DA8A1F88FF8F423073F81CA9

It attempts to gist the results, that succeeds and github gives json response. Then, Pastebin::Gist asks JSON::Fast to decode it, and that fails. Either Github is producing invalid json (unlikely), or JSON::Fast is wrong.

Here is the gist that was produced: https://gist.github.com/Whateverable/405d169a6aca013618e4e01d4b431bde

No JSON::Fast bug report yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the quoted input and inspect Whateverable.pm6 at the filter and upload methods around lines 430 and 456. Then trace Pastebin::Gist's paste method and JSON::Fast decoding to determine whether the GitHub response or the decoder is responsible. Done means this input can be uploaded and its response decoded without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.