|mach ide vscode| removes existing settings
Categories
(Developer Infrastructure :: Developer Environment Integration, defect, P3)
Tracking
(Not tracked)
People
(Reporter: sidvishnoi, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0
Steps to reproduce:
- Run
mach ide vscode
- Accept "Configuration for vscode/settings.json must change" prompt.
Actual results:
The command removed existing configuration in settings.json
.
This happens because the .vscode/settings.json
is non-standard JSON (it supports comments and trailing commas), so the default json module in Python doesn't take them into account, leading to an exception at https://searchfox.org/mozilla-central/rev/803b368879fa332e8e2c1840bf1ec164f7ed2c32/python/mozbuild/mozbuild/backend/mach_commands.py#240-242
Expected results:
Existing options should've persisted.
At minimum, the exception should be logged to inform user that their settings will be overwritten, and not just edited.
Nicer would be to use a json library that supports vscode's settings.json.
Updated•4 years ago
|
Updated•2 years ago
|
Comment hidden (obsolete) |
Updated•1 year ago
|
Comment hidden (obsolete) |
Updated•1 year ago
|
Description
•