Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gopls: crash due to use of workspace folders with non-file uri scheme #3368

Open
gilde1337 opened this issue Apr 26, 2024 · 1 comment
Open
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@gilde1337
Copy link

gopls version: v0.15.3/go1.22.2
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code win32
initialization error: Error: invalid WorkspaceFolder.URI: DocumentURI scheme is not 'file': decompileFs:/
issue timestamp: Fri, 26 Apr 2024 17:59:38 GMT
restart history:
Fri, 26 Apr 2024 17:59:35 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace and error messages from that window and paste it in this issue.

Failed to auto-collect gopls trace: no gopls log.

gopls stats -anon { "DirStats": { "Files": 0, "TestdataFiles": 0, "GoFiles": 0, "ModFiles": 0, "Dirs": 3 }, "GOARCH": "amd64", "GOOS": "windows", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.2", "GoplsVersion": "v0.15.3", "InitialWorkspaceLoadDuration": "413.9466ms", "MemStats": { "HeapAlloc": 2536344, "HeapInUse": 4997120, "TotalAlloc": 10544536 }, "WorkspaceStats": { "Files": { "Total": 0, "Largest": 0, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.2", "AllPackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "WorkspacePackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "Diagnostics": 0 } ] } }

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>

@gopherbot gopherbot added this to the Untriaged milestone Apr 26, 2024
@hyangah
Copy link
Contributor

hyangah commented Apr 29, 2024

Thanks @gilde1337 Are you using the decompiler extension, while working on Go files in other workspace folders?
Or are you trying to open a go file in the archive the decompiler extension decompiles?

Looks like the extension is registering a workspace folder over this virtual file system
https://github.com/tintinweb/vscode-decompiler/blob/master/src/features/decompile.js#L88
but gopls cannot handle it.

cc @golang/tools-team

@hyangah hyangah added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 29, 2024
@hyangah hyangah changed the title gopls: automated issue report (initialization) gopls: crash due to use of workspace folders with non-file uri scheme Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants