Skip to content

x/tools/gopls: determine how frequently to reload packages with missing dependencies #36918

Closed
@stamblerre

Description

@stamblerre

Currently, when a user's package has a dependency that we can't resolve, we try to reload the package on every key stroke. We take care not to re-check it unless the metadata has changed, but it's still expensive to call packages.Load on every keystroke.

I wonder if we might be able to somehow make use of the goimports scanning logic in gopls to do this in a better way. It's possible that we can't do better in GOPATH mode (or in another build system), but I'd think we might be able to do something better in module mode.

@heschik: Is this a reasonable idea, or should we just stick with the current approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeThinkingToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions