auxves / vscode-syncify

A reliable way of syncing your VSCode settings and extensions
https://arnohovhannisyan.space/vscode-syncify
MIT License
15 stars 1 forks source link

Issue with vscode 1.47.0 - extensions.json should not be located in the user data directory #53

Open jkrgr0 opened 4 years ago

jkrgr0 commented 4 years ago

Syncify Version and Operating System

I am using Syncify v4.0.4 on Windows

Describe the bug

After installing and launching VS Code 1.47.0 every extension is missing and the Extensions pane loads infinitely.
For a detailled description see Issue#102082 in microsoft/vscode.

This bug exists, because Syncify creates a extension.json in the user data directory (%APPDATA%\Code\User in my case) where the settings.json is located. This folder is owned by VS Code so this lead to the issue. See this comment of @sandy081 for details.

If the extensions.json is removed from the user data directory and VS Code is restarted, vscode runs without any issues until Syncify run a Sync or Upload.

To Reproduce

Steps to reproduce the behavior:

  1. Syncify is setup (File or Repo Syncer)
  2. Run the Sync or Upload task of Syncify
  3. Install the update to vscode 1.47.0
  4. Restart VS Code
  5. VS Code does not load any extensions and the Extensions pane loads infinitely

If you manually create a extensions.json file with valid json content in the user data directory, VS Code should also fail to load the extensions on next startup:

  1. Create an extensions.json file next to settings.json in your user data dir with following content
    [
      {
        "id": "a"
      },
      {
        "id": "b"
      }
    ]
  2. Open VS Code. No extension should now be loaded and the Extensions pane should loads infinitely

Expected behavior

Syncify should not create the extensions.json file in the user data directory.

Screenshots

Additional context

sandy081 commented 4 years ago

Recommendation is to use extension's global storage home to store extension's global state like this - https://code.visualstudio.com/api/extension-capabilities/common-capabilities#data-storage