[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ fsharp Public
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go To Definition - f12 fails, tooltip works #5521

Closed
isaacabraham opened this issue Aug 16, 2018 · 22 comments
Closed

Go To Definition - f12 fails, tooltip works #5521

isaacabraham opened this issue Aug 16, 2018 · 22 comments

Comments

Copy link
Contributor

If you F12 on a symbol in another file, it can't navigate to the item. However, if you click the type in the tooltip that follows, it works.

Copy link
Contributor

I already experienced that in a Fable project with 15.7 .

In 15.8 it still doesn't work there but it works for me on a backend project so looks like it's bound to specific circumstances?

Copy link
Contributor

@isaacabraham can you provide some more details or upload a repro solution?

Using 15.8, .NET Core project:

fsx-to-fs in a .NET Framework project:

Copy link
Contributor

@isaacabraham Do you have a repro? I used this throughout the VF# codebase yesterday and could not get GTD to fail.

Copy link
Contributor Author

I've managed to get a repro in an existing project. The only thing I can see that might be the cause is that the symbol I'm trying to go to definition on lives in a linked .fs file in the project, rather than a normal project file.

Copy link
Contributor Author

isaacabraham commented Aug 22, 2018

I can also reproduce on a script where I'm loading in an .fs file and trying to go to definition of a symbol defined in that. It works if I click on the symbol link in the tooltip, but not with F12.

Copy link
Contributor

0x53A commented Aug 22, 2018

I've seen the same in safe bookstore - f12 mostly doesn't work, the clickable tooltips do

Copy link
Contributor

@isaacabraham in the second GIF, I'm doing the same as this:

I can also reproduce on a script where I'm loading in an .fs file and trying to go to definition of a symbol defined in that.

But it succeeds. Do you have a repro?

I'll take a look at the fable bookstore, which uses linked files.

Copy link
Contributor Author

@cartermp this is then something either environmental - my install of 15.8.1 is somehow borked, or something specific with the project. But I can't see anything there else unusual - it's a netcore2.0 console app.

There's definitely something different in the behaviour of Go To Definition when hitting F12 compared to clicking the hyperlink in the tooltip, because the latter works whilst F12 doesn't.

Copy link
Contributor

@isaacabraham The implementation of go to def and links on the tooltip are completely different (and surprisingly complicated).

Copy link
Contributor

@isaacabraham I just tried with a .NET Core 2.1 console app with a script that navigates to a symbol in a source file for that project: works with f12, ctrl+click, and tooltip go to definition.

Copy link
Contributor

forki commented Aug 22, 2018

So zip with repro it is. Like always...

Copy link
Contributor

cartermp commented Aug 22, 2018

Okay, so the issue is when you attempt to go to definition from one linked file to another. Example:

Home.fs --> viewLink symbol

Tooltip shows and you can go to definition, but cannot use f12 or ctrl+click (which share the same implementation).

If files are "normal", or you're going to definition within a linked file, or going to definition between linked/non-linked files, everything seems to work.

I also noticed that finding symbols for Find Refs or Rename is inconsistent in this project. For example:

Wishlist/Msg:

Not a linked file, and the references live in the same file.

Database/DatabaseType:

Not a linked file, and all references live in the same file.

Bug: #5545

Copy link
Contributor

@isaacabraham can you update the title to accurate reflect that this is between linked files?

Copy link
Contributor Author

@cartermp I said that the project contained a link file. I don't believe that all of the issues I'm seeing are only related to symbols that live in that linked file. I'll double check this later today.

Copy link
Contributor

My observations are on playing around with the Bookstore app myself. If you can upload a repro that isn't Go to Definition from a linked file to a linked file, I'd appreciate that.

Copy link
Contributor Author

@cartermp I think the latest version of master in the Azure Storage TP has this issue now (at least, I'm seeing it there).

isaacabraham changed the title Go To Definition in 15.8 is broken again Go To Definition in 15.8 is broken again when linked files are used Nov 29, 2018
Copy link
Contributor

Do you have a specific repro there? What I noticed in SAFE was specifically when moving from linked file -> linked file. Is that the same in the Azure Storage TP codebase?

Copy link
Contributor Author

@cartermp I don't believe that there are any linked files in there. It seems to happen when going to definition of a symbol in another file e.g. In AzureTypeProvider.fs, line 69 - try to F12 on Table.StaticSchema.createSchema.

cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
cartermp removed this from the 16.2 milestone Apr 30, 2019
cartermp added this to the Backlog milestone Apr 30, 2019
Copy link
Contributor Author

I can confirm that this problem still exists in the latest master of the Azure Storage TP.

cartermp changed the title Go To Definition in 15.8 is broken again when linked files are used Go To Definition - f12 fails, tooltip works Aug 9, 2019
Copy link
Contributor

cartermp commented Aug 9, 2019

Noting this in two additional areas:

  • Tachyus' solution after a chat with them
  • Our own codebase, when going from FSharp.Editor --> FSharp.Compiler.Private

Copy link
Contributor

zanaptak commented Aug 9, 2019

In the Azure TP it's the forward slashes #4016

Copy link
Contributor

cartermp commented Aug 9, 2019

Fixed by #7376

cartermp closed this as completed Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants