Skip to content

Find all references does not find all references #3147

Open
@eltix

Description

@eltix

Your environment

Which OS do you use?

Ubuntu 20.04

Which version of GHC do you use and how did you install it?

GHC 9.2.3

How is your project built (alternative: link to the project)?

Nix+bazel

Which LSP client (editor/plugin) do you use?

We're using VSCode with the Haskell plugin

Steps to reproduce

In any project, "Find all references" does not reference files that have not been indexed by HLS.
From what we've empirically inferred, it seems that HLS only lists the references appearing in already indexed files and indexing is lazy. Files that have never been indexed (because they're leaves of the dependency tree and have never been opened in the editor) are off the radar.
After opening said files, "Find all references" does list all the references. This kind of defeats the purpose of the feature since one has first to Ctrl-Shift-F the function of interest, open the search hits in the editor and then use the "Find all references".
The fact that one cannot "trust" the result of "Find all references" because it depends on the history of opened files in the editor is a problem. It would be more accurate to call the feature "Find some references (warning: lazy search)" or something similar.

Expected behaviour

One would expect "Find all references" to find all references

Actual behaviour

"Find all references" does not find all references.

Metadata

Metadata

Assignees

No one assigned

    Labels

    multi-componentIssues relating to multi-component supportstatus: needs infoNot actionable, because there's missing informationtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions