Open Bug 1670997 Opened 4 years ago Updated 1 year ago

|mach ide vscode| removes existing settings

Categories

(Developer Infrastructure :: Developer Environment Integration, defect, P3)

Firefox 83

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:

  1. Run mach ide vscode
  2. 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.

Blocks: clangd
Severity: -- → S3
Priority: -- → P3
Product: Firefox Build System → Developer Infrastructure
Assignee: nobody → standard8
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee: standard8 → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: