r3inbowari / go-mod-explorer

Go Module Explorer for Visual Studio Code (beta)
https://marketplace.visualstudio.com/items?itemName=r3inbowari.gomodexplorer
MIT License
33 stars 6 forks source link

VS Code editor hangs and extension host has to restart #50

Closed bitforce closed 1 year ago

bitforce commented 1 year ago

Current specs

Macbook Pro 16-inch, 2021 Apple M1 Max 64GB macOS Ventural 13.1


VS Code Version: 1.76.2 (Universal) Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884 Date: 2023-03-14T17:54:09.061Z (1 wk ago) Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Darwin arm64 22.2.0 Sandboxed: No

Issue

Screenshot 2023-03-27 at 11 21 24 AM

I'll get this error on startup and VS Code will randomly hang until the extension host terminates and auto-restarts.

Screenshot 2023-03-27 at 11 43 18 AM

When switching tabs (using the Vim plugin), this behavior happens the most frequently.

r3inbowari commented 1 year ago

Hi,@bitforce. Thanks for your feedback. Could you provide the go env and the go.mod file?

bitforce commented 1 year ago

Unfortunately; I cannot, but I can describe the usage. Our codebase is comprised of many go.mod files: one at the root of the directory and a go.mod many of our subdirectories. Example:

PROJECT
  frontend/
  backend/
    subdir1/
     ...
     go.mod
     go.sum
   subdir2/
     ...
     go.mod
     go.sum
  docker-compose.yml
  go.mod
  go.sum
  Makefile
  README
r3inbowari commented 1 year ago

Okay, 'go env' can't provide it either, right? we need to know the version of go at least. Because this problem is roughly caused by the failure of parsing json. or will this error have any substantial impact, for example, a module is missing in go mod explorer, or there is no display at all.

I'll get this error on startup and VS Code will randomly hang until the extension host terminates and auto-restarts.

I'll keep looking into this issue.

bitforce commented 1 year ago

Makes sense: go version go1.19.4 darwin/arm64

r3inbowari commented 1 year ago

Hi, @bitforce! Sorry for the late reply... We use a new way to parse the modules json, but I still suggest you to open devtool and report this error(you can desensitize relevant data, we only want to check the specific location of the error in the json).

error messages like this: image