Skip to content

"settings.json" with comments crashes extension. #23

@sommd

Description

@sommd

Since the latest update it looks like the extension parses the JSON files to merge them instead of just copying. VSCode supports JSON comments however JavaScript's JSON does not. This causes the extension to crash:

[Extension Host] Here is the error stack:  SyntaxError: Unexpected token / in JSON at position 6
    at JSON.parse (<anonymous>)
    at LocalSettings.import (/home/david/.vscode/extensions/golf1052.code-sync-2.3.0/out/src/local-settings.js:12:29)
    at CodeSync.importSettings (/home/david/.vscode/extensions/golf1052.code-sync-2.3.0/out/src/cs.js:167:49)
    at /home/david/.vscode/extensions/golf1052.code-sync-2.3.0/out/src/extension.js:27:26
    at Generator.next (<anonymous>)
    at fulfilled (/home/david/.vscode/extensions/golf1052.code-sync-2.3.0/out/src/extension.js:4:58)
    at runMicrotasksCallback (internal/process/next_tick.js:58:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

The only error message is in the developer console, and the extension's status indicator is stuck on "Importing settings".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions