After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785831 - New project flatpak JSON contains invalid JSON after changing Configure Options
New project flatpak JSON contains invalid JSON after changing Configure Options
Status: RESOLVED OBSOLETE
Product: gnome-builder
Classification: Other
Component: templates
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
: 788219 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-08-04 16:02 UTC by Link Dupont
Modified: 2018-01-11 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Link Dupont 2017-08-04 16:02:26 UTC
STEPS TO REPRODUCE

1. Create new GNOME project
2. Select 'Build Preferences' (Alt-,)
3. Add --enable-debug to 'Configure Options'

EXPECTED RESULTS
The '--enable-debug' option to be added to the flatpak JSON file.

ACTUAL RESULTS
The JSON file ends up with some invalid unicode characters. This diff:

diff --git a/org.gnome.TestJson.json b/org.gnome.TestJson.json
index c38fd29..641ef30 100644
--- a/org.gnome.TestJson.json
+++ b/org.gnome.TestJson.json
@@ -46,7 +46,8 @@
                         "type": "git",
                         "url": "file:///home/link/Projects/test-json"
                     }
-            ]
-        }
+<C0><94>,
+            "config-opts": ["--enable-debug"],
     ]
+        }
 }


NOTES
Typing into the Configure Options text field is also extremely laggy. It feels as if some heavy validation is being run on each character entry into the field.

gnome-builder-3.24.2-2.fc26.x86_64
Comment 1 Christian Hergert 2017-08-04 16:03:59 UTC
We have some regex-based code here that tries to non-destructively edit your JSON manifest (to avoid losing comments/formatting/etc). It's probably acting up based on the input.

We probably need to be much more strict in input checks to sanitize things before replacing.
Comment 2 Christian Hergert 2017-09-26 22:20:26 UTC
*** Bug 788219 has been marked as a duplicate of this bug. ***
Comment 3 GNOME Infrastructure Team 2018-01-11 10:36:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-builder/issues/263.