ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
865 stars 280 forks source link

Ionide doesn't find references to almost anything. #1718

Closed babysnakes closed 2 years ago

babysnakes commented 2 years ago

Describe the bug

I didn't work on F# project for several months now so I don't know when this happened but when I tried to open an F# project today It didn't find any references to almost all of the symbols I pointed it to. Actually, In my quick tests it only found references to functions within other functions. Anything with larger scope (even within a file) didn't work - It just says no reference found fot .... I couldn't find any related errors in the logs.

Steps to reproduce

  1. Open an _F# project (in my case it was https://github.com/matthewcrews/FSharpPerformance - it contains multiple projects, I opened TopologicalSort)
  2. Wait for the project to completely load and open a file (In my case Version1.fs.
  3. Go to a type or function (in my case sort).
  4. Right click and select Go To References - It should say that no references were found.
  5. If you click on a subfunction (e.g. loop within sort) you'll get the references.

Link to sample reproduction

I first saw it in the repository linked above but it happened on all F# repositories I have locally on two computers.

Expected behaviour

Show references.

Screenshots

image

Machine info

Additional context

To avoid clashes with other extensions I also tried this on a portable installation without any extensions except Ionide and it was the same behavior.

baronfel commented 2 years ago

This should be fixed in the next release we make - references and renames (along with other features that rely on finding symbol uses) had some issues that we've hopefully ironed out.

babysnakes commented 2 years ago

This was fast 🙂,

Thanks

babysnakes commented 2 years ago

Hey @baronfel,

I now have version 6.0.6 installed but the problem persists. Note that going forward (e.g. go to definition) does work - also worked in the previous version.

baronfel commented 2 years ago

Sorry, I haven't released a version of FSAC with the fix yet - I put out a patch release of Ionide with some other fixes first. I'm doing some perf testing on it before releasing.

backerman commented 2 years ago

This bug is fixed in Ionide 7.0.0 with .NET Core 6.0.302 but shows up again in .NET Core 6.0.400-preview.22330.6. (Easy workaround: local.json to force the non-preview build).

babysnakes commented 2 years ago

@baronfel, It now works again 🙂 (Ionide 7.0.0 with stable .Net 6.0). Should I close this ticket or should I leave it because of what @backerman discovered about preview version?

baronfel commented 2 years ago

I made a new issue for the preview problem specifically, so we can close this.