Skip to content

x/tools/gopls: deprecate the "experimentalUseInvalidMetadata" setting #54180

Closed

Description

@findleyr

Discovered while investigating #54147: with "experimentalUseInvalidMetadata" set, we may diagnose a package with invalid metadata, and not re-diagnose when new metadata arrives. This can lead to diagnostics which are stale until you begin typing again.

We could fix this by re-diagnosing after each metadata load, but more generally we should reconsider whether it is worth landing this feature:

Pros:

  • when the workspace is totally broken, gopls will continue to work

Cons:

  • though gopls will continue to work, it may have inconsistent or confusing state
  • users should generally fix broken workspaces before doing anything else
  • we really don't want users to have to restart gopls, so in all other respects we are trying to avoid places where gopls "remembers history"

Activity

  1. added this to the gopls/later milestone on Aug 1, 2022
  2. added
    ToolsThis label describes issues relating to any tools in the x/tools repository.
    goplsIssues related to the Go language server, gopls.
    on Aug 1, 2022
  3. gopherbot commented on Aug 3, 2022

    @gopherbot
    Contributor

    Change https://go.dev/cl/420956 mentions this issue: internal/lsp/cache: invalid packages should not be workspace packages

  4. findleyr commented on Sep 22, 2022

    @findleyr
    ContributorAuthor

    CC @adonovan

    Unless anyone objects, I propose that we remove this setting. We should avoid any cases where gopls' state is path-dependent.

  5. changed the title [-]x/tools/gopls: reconsider the experimental feature to use invalid metadata[/-] [+]x/tools/gopls: deprecate the "experimentalUseInvalidMetadata" setting[/+] on Sep 22, 2022
  6. gopherbot commented on Sep 26, 2022

    @gopherbot
    Contributor

    Change https://go.dev/cl/434640 mentions this issue: gopls: deprecate three experimental features

  7. gopherbot commented on Nov 18, 2022

    @gopherbot
    Contributor

    Change https://go.dev/cl/452057 mentions this issue: gopls/internal/lsp/cache: eliminate obsolete invalidation step

  8. added a commit that references this issue on Jan 7, 2023
  9. added a commit that references this issue on Jan 18, 2023
  10. added a commit that references this issue on Jun 28, 2023
  11. locked and limited conversation to collaborators on Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis 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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions