GNOME Bugzilla – Bug 785831
New project flatpak JSON contains invalid JSON after changing Configure Options
Last modified: 2018-01-11 10:36:25 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
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.
*** Bug 788219 has been marked as a duplicate of this bug. ***
-- 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.