tony-o / raku-fez

This project is for 'fez', raku's cool new shiny dist uploader & manager. If you're a module author you should definitely be using this sweet thang. ;;;;;;;;;;;;;; This project and the underlying infrastructure is supported out of my own pocket and through donations. If you'd like to donate please check here: https://www.patreon.com/oynot
Artistic License 2.0
20 stars 12 forks source link

Invalid JSON: at 266: json requires object keys to be strings #109

Open dufresnep opened 1 year ago

dufresnep commented 1 year ago
paul@fedora:~/myraku/comp/FreeDOS--Packager/lib/FreeDOS$ fez refresh
Invalid JSON: at 266: json requires object keys to be strings
  in sub from-j at /home/paul/.raku/sources/61DF8C254BC17601DDB7E087D2BE0DC37A1C9AE0 (Fez::Util::Json) line 4
  in sub MAIN at /home/paul/.raku/sources/E70D075AB5A85C98F4D80EE2659F703F171B8E3E (Fez::CLI) line 768
  in block <unit> at /home/paul/.raku/resources/1B3EFC55F4CBF2A17A7C76FEE8A1DDEFB16A8156 line 4
  in sub MAIN at /home/paul/.raku/bin/fez line 3
  in block <unit> at /home/paul/.raku/bin/fez line 1

paul@fedora:~/myraku/comp/FreeDOS--Packager/lib/FreeDOS1$

Zef was installed yesterday... for the first time (so I might have given strange input, learning).

Discover just before with:

paul@fedora:~/myraku/comp/FreeDOS--Packager/lib/FreeDOS1$ fez dep Archive::SimpleZip
Invalid JSON: at 266: json requires object keys to be strings
  in sub from-j at /home/paul/.raku/sources/61DF8C254BC17601DDB7E087D2BE0DC37A1C9AE0 (Fez::Util::Json) line 4
  in sub MAIN at /home/paul/.raku/sources/E70D075AB5A85C98F4D80EE2659F703F171B8E3E (Fez::CLI) line 964
  in sub MAIN at /home/paul/.raku/sources/E70D075AB5A85C98F4D80EE2659F703F171B8E3E (Fez::CLI) line 955
  in block <unit> at /home/paul/.raku/resources/1B3EFC55F4CBF2A17A7C76FEE8A1DDEFB16A8156 line 4
  in sub MAIN at /home/paul/.raku/bin/fez line 3
  in block <unit> at /home/paul/.raku/bin/fez line 1

Moving to ~/myraku/comp/FreeDOS--Packager1$ directory did not fixed the issue.

I don't know why there is a '1' at the end of my prompt! It appears only when type fez commands. Was not having problems yesterday night... computer did stay open all night, was trying to continue this morning.

dufresnep commented 1 year ago

Problem persist after reboot. Now having '2' at the end of prompt, rather than '1'.

dufresnep commented 1 year ago

Other commands now show (at the end of prompt) what seems exit code:

paul@fedora:~$ fez v
>>= fez version: 55
paul@fedora:~$ fez refresh
=<< FATAL: could not find META6.json
paul@fedora:~1$ pwd
/home/paul
paul@fedora:~$ cd myraku/
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ mkdir test
mkdir: impossible de créer le répertoire « test »: Le fichier existe
paul@fedora:~/myraku1$ ls test
smiley-main
paul@fedora:~/myraku$ mkdir test2
paul@fedora:~/myraku$ cde test2
bash: cde: commande inconnue...
paul@fedora:~/myraku127$ cde test2
bash: cde: commande inconnue...
paul@fedora:~/myraku127$ cd allo
bash: cd: allo: Aucun fichier ou dossier de ce type
paul@fedora:~/myraku1$ cde
bash: cde: commande inconnue...
paul@fedora:~/myraku127$ 
dufresnep commented 1 year ago

It looks like the error code at the end of prompt is a new feature, not related to the problem.

dufresnep commented 1 year ago

Oh... fixed I think... Because fez did not seems to have a command to remove a module, I did manually and had a ',' at the end that needed to be removed:

  "name": "FreeDOS--Packager",
  "provides": {
    "FreeDOS::Packager": "lib/FreeDOS/Packager.rakumod",
    "help": "lib/help.rakumod",

after removing the ',' at the end of help line, seems fixed.

Edit: Oh I think I get it... you add and remove .rakumod files, and then when doing 'fez refresh' it updates the META6.json file accordingly.