Skip to content

Go To Definition - f12 fails, tooltip works #5521

Closed

Description

@isaacabraham

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.

Activity

  1. realvictorprm commented on Aug 16, 2018

    @realvictorprm
    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?

  2. cartermp commented on Aug 16, 2018

    @cartermp
    Contributor

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

    Using 15.8, .NET Core project:

    gtd1

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

    gtd2

  3. cartermp commented on Aug 17, 2018

    @cartermp
    Contributor

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

  4. isaacabraham commented on Aug 22, 2018

    @isaacabraham
    ContributorAuthor

    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.

  5. isaacabraham commented on Aug 22, 2018

    @isaacabraham
    ContributorAuthor

    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.

  6. 0x53A commented on Aug 22, 2018

    @0x53A
    Contributor

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

  7. cartermp commented on Aug 22, 2018

    @cartermp
    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.

  8. isaacabraham commented on Aug 22, 2018

    @isaacabraham
    ContributorAuthor

    @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.

  9. vasily-kirichenko commented on Aug 22, 2018

    @vasily-kirichenko
    Contributor

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

  10. cartermp commented on Aug 22, 2018

    @cartermp
    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.

  11. forki commented on Aug 22, 2018

    @forki
    Contributor

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

  12. cartermp commented on Aug 22, 2018

    @cartermp
    Contributor

    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:

    image

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

    Database/DatabaseType:

    image

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

    Bug: #5545

  13. 10 remaining items

  14. added this to the 16.1 milestone on Feb 21, 2019
  15. modified the milestones: 16.1, 16.2 on Apr 23, 2019
  16. modified the milestones: 16.2, Backlog on Apr 30, 2019
  17. isaacabraham commented on Jun 18, 2019

    @isaacabraham
    ContributorAuthor

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

  18. added
    Impact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.
    on Aug 9, 2019
  19. changed the title [-]Go To Definition in 15.8 is broken again when linked files are used[/-] [+]Go To Definition - f12 fails, tooltip works[/+] on Aug 9, 2019
  20. cartermp commented on Aug 9, 2019

    @cartermp
    Contributor

    Noting this in two additional areas:

    • Tachyus' solution after a chat with them
    • Our own codebase, when going from FSharp.Editor --> FSharp.Compiler.Private
  21. zanaptak commented on Aug 9, 2019

    @zanaptak
    Contributor

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

  22. modified the milestones: Backlog, 16.3 on Aug 9, 2019
  23. cartermp commented on Aug 9, 2019

    @cartermp
    Contributor

    Fixed by #7376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-LangService-APIBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions