resharper-fsharp icon indicating copy to clipboard operation
resharper-fsharp copied to clipboard

Go to definition on any Seq function goes to prim-types.fs instead of seq.fs

Open NinoFloris opened this issue 5 years ago • 7 comments

Go to definition on any Seq function goes to prim-types.fs instead of seq.fs

¯\(ツ)

NinoFloris avatar Mar 03 '20 19:03 NinoFloris

@NinoFloris Could add more details like the solution used for a complete repro, please?

auduchinok avatar Mar 03 '20 19:03 auduchinok

let foo = 
    Seq.singleton 1 // <-- go to definition

Sorry @auduchinok but this one seems obvious.

NinoFloris avatar Mar 03 '20 19:03 NinoFloris

@NinoFloris Sorry, even though it could seem that way, looking at the initial comment only, it might be possible that you were talking about navigation inside a compiler solution (like FSharp.sln, FSharp.Compiler.Service.sln, or others), and there might have been some behaviour differences due to some of them referencing FSharp.Core as a package/assembly reference and some referencing it as a project reference. If this is the case, the solution info and a project to navigate from would still actually help to reproduce the exact problem.

The second comment suggests it could be some non-compiler solution and I've checked it on a random file in Fantomas.sln and it seemed to be using SourceLink info which is something I haven't seen working previously (though, I haven't checked it for a while). In my case it suggested both files and at least one of them was what you were expecting.

Screenshot 2020-03-03 at 22 12 31

I'll need to check if the problem is actually on our side and not something encoded wrongly somewhere else, presumably in SourceLink.

auduchinok avatar Mar 03 '20 19:03 auduchinok

Alright makes, sense I'll try to add some more info next time :)

I really only get a direct go to definition into prim-types, no dropdown. This is on EAP 2

NinoFloris avatar Mar 03 '20 19:03 NinoFloris

This is still the case in 2021.2 in a regular net5.0 tfm console app.

Doesn't matter if you click on Seq or singleton. https://user-images.githubusercontent.com/4218809/123522829-4a16b880-d6c0-11eb-9d0c-b0de01069bbd.mov

NinoFloris avatar Jun 26 '21 18:06 NinoFloris

Did this get fixed? I can't repro it anymore 🎉 finally going straight to seq.fs (though this is on the dev build you gave me, I'll wait for EAP 7 to reconfirm before I close it)

NinoFloris avatar Jul 14 '21 14:07 NinoFloris

The cases above are still working great.

There are some cases left though like going to definition for Option.None still doesn't quite end up where it should be in the file.

Similarly trying to go to def for IEvent<'Args> ends up showing a decompiled version of IEvent<'Delegate, 'Args> instead, so that doesn't even point to prim-types.fs

NinoFloris avatar Jul 28 '22 13:07 NinoFloris