Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Reinstall tools when a GOROOT change is detected #1286

@FiloSottile

Description

@FiloSottile

When the GOROOT changes (for example when Go is updated on macOS with Homebrew) the old GOROOT stays embedded in the binaries built with the old toolchain. This causes all kinds of things to break: list packages, autocomplete, autocompleteUnimportedPackages all break for stdlib packages.

This is the scenario explained here: https://blog.filippo.io/stale-goroot-and-gorebuild/

Ideally, the extension should detect this and rebuild the tools, also because the Go version changed, so it's probably time to rebuild code analysis tools. Otherwise, it should explicitly set the GOROOT env var to the output of go env GOROOT.

Similar to fatih/vim-go#901

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions