[0.16.2]Game accepts extra comma in info.json

This subforum contains all the issues which we already resolved.
Post Reply
aaargha
Filter Inserter
Filter Inserter
Posts: 329
Joined: Wed Dec 07, 2016 8:35 am
Contact:

[0.16.2]Game accepts extra comma in info.json

Post by aaargha »

This is most likely a pretty minor issue but never the less:
Noticed by accident that the game accepts a incorrect comma on the last value. The mods.factorio.com correctly (I think?) rejects this so it's not really possible to distribute mods with this minor error.

Example (is also the attached mod):

Code: Select all

{
  "name": "Malformed",
  "version": "0.1.0",
  "factorio_version": "0.16",
  "title": "Malformed",
  "author": "aaargha",
  "contact": "",
  "homepage": "",
  "description": "",
}
Attachments
Malformed_0.1.0.zip
(262 Bytes) Downloaded 135 times

dewiniaid
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 07, 2017 8:50 pm
Contact:

Re: [0.16.2]Game accepts extra comma in info.json

Post by dewiniaid »

Also present in 0.15.37

I'd also appreciate it the game was strict in parsing info.json, since it can otherwise cause an hour or more of troubleshooting when trying to upload to the mod portal and wondering why it is rejected.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.2]Game accepts extra comma in info.json

Post by posila »

Alright, fixed for 0.16.3

dr_vm
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Sep 23, 2017 3:06 pm
Contact:

Re: [0.16.3]Game accepts extra comma in info.json

Post by dr_vm »

Unfortunately, Factorio seems to fix this in a way that it quits resp. shutdowns directly instead of showing the Error to the user resp. modder.

0.000 2017-12-15 18:00:40; Factorio 0.16.3 (build 34357, linux64, steam)
......
1.862 Checksum of Vehicle_Radar: 3657150715
2.096 Loading sounds...
2.165 Error Util.cpp:49: Invalid comma before `]'. at __mini-machines__/migrations/mini-machines_4.0.9.json:7
2.249 Steam API shutdown.
2.251 Goodbye

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.2]Game accepts extra comma in info.json

Post by posila »

Ah, we don't have native dialog for early errors on Linux.
Will take a look if it's possible to enter to minimal mode at this stage.

User avatar
riking
Inserter
Inserter
Posts: 42
Joined: Thu May 05, 2016 5:35 pm
Contact:

Re: [0.16.2]Game accepts extra comma in info.json

Post by riking »

Let's not fix this and say we did

It's much easier to manually write JSON when you're allowed extra commas...

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.2]Game accepts extra comma in info.json

Post by posila »

riking wrote:It's much easier to manually write JSON when you're allowed extra commas...
I think the mod portal argument is pretty strong.

User avatar
HanziQ
Former Staff
Former Staff
Posts: 630
Joined: Fri Mar 27, 2015 7:07 am
Contact:

Re: [0.16.2]Game accepts extra comma in info.json

Post by HanziQ »

I thought we already had native_dialog with gtk for linux.

Anyway I am all for introducing json5, but do it with a .json5 extension and .json for valid json.

Post Reply

Return to “Resolved Problems and Bugs”