Skip to content

x/tools/gopls: missing unimported package candidates #35359

Closed
@muirdm

Description

@muirdm

Repro (assuming completeUnimported=true is configured):

  1. Create a new module with contents:
package main

func main() {
}
  1. Complete rand.. You should see suggestions from crypto/rand and math/rand.
  2. Select rand.Int from "crypto/rand"
  3. Delete line and save ("crypto/rand" import should disappear).
  4. Wait a second to make sure "crypto/rand" package handle gets GC'd 😉
  5. Complete rand. again. Now you only see untyped completions from "crypto/rand". I expected to see typed completions from "crypto/rand" and completions from "math/rand".

See https://youtu.be/VaOs1crVI4g

/cc @stamblerre @heschik

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