flathub/org.gimp.GIMP

Invalid JSON in org.gimp.GIMP.json

Closed this issue ยท 3 comments

When attempting to do processing of the repo (and a subsequent build) it turns out that the JSON in org.gimp.GIMP.json has been invalid for about 18 mos due to commit 3ca5750

Specifically, within the JSON specification there is no support for comments like (hence, why GitHub's syntax highlighting shows this as invalid):

/* Shamelessly taken from org.octave.Octave manifest! */

While some of the tooling within the flatpak ecosystem attempts to resolve missteps like this (e.g. flatpak/flatpak-builder-tools/flatpak-json2yaml.py ) comments should be avoided so as to not break other tooling.

Jehan commented

I know this is technically invalid but Flathub and flatpak-builder allow this (let's call it an "extension" to the json format) as a way to add comments (json format unfortunately doesn't have any concept of comments otherwise). Technically here it reminds me where I got this from, so that if some day, it gets broken, I can try and see if the octave project hasn't got any solution already; for SuiteSparse, I still remember how painful it was to try and get it to build for all target platforms (all this to say how valuable comments in code can be, because if I can avoid going again through the pain of getting this to build, it is worth it).

What kind of usage do you have here and why is it a problem? This manifest was done to be processed by flatpak-builder and as long as the tool is happy with my file, I really want to keep my ability to comment when really needed (which is not too often, as you can see, but even this once is enough; as I said: painful memories!).

P.S.:

invalid for about 18 mos due to commit 3ca5750

Checking the git log, it's even a tiny bit older. The comment appeared on commit c7c5094. ๐Ÿ˜‰

I was (attempting to) similarly use this as boilerplate for packaging an application due to the sparse documentation on building Flatpaks which go beyond "hello world". I ran into this bug when using jq to introspect the file.

Playing devils advocate for a moment:

Technically here it reminds me where I got this from

Isn't that the point of git blame?

Regardless NOTABUG/WONTFIX works for me, I was just trying improve software for others.

Jehan commented

Isn't that the point of git blame?

git blame works fine as long as you never touched the lines. But as you demonstrated yourself by not reporting the right commit which added this line, but actually the last one which touched it, it becomes harder to use if you touched a line repeatedly (well you can still call git blame <hash>^ -- file until you find the original commit, but it's a bit boring). ๐Ÿ˜‰

It doesn't beat a good comment on special cases. As you note, I don't overdo comments though. This one was really particular (because this package was really really horrible to build ๐Ÿ˜ฉ, I'm talking months of frustration, so I absolutely needed to remember the reference).

Regardless NOTABUG/WONTFIX works for me, I was just trying improve software for others.

Yep thanks for the report! ๐Ÿ™