Code Monkey home page Code Monkey logo

Comments (8)

vzarytovskii avatar vzarytovskii commented on June 9, 2024 1

@CyrusNajmabadi @tmat do you folks happen to know how does roslyn navigate to the external source? Might be good idea for us to properly support it. We'll likely want to do it in following order: show source link if available, then show F# decompilation (or rather high level representation).

from fsharp.

davidwengier avatar davidwengier commented on June 9, 2024 1

The main piece of logic for navigating to sourcelink sources starts here: https://github.com/dotnet/roslyn/blob/ca66296efa86bd8078508fe7b38b91b415364f78/src/Features/Core/Portable/PdbSourceDocument/PdbSourceDocumentMetadataAsSourceFileProvider.cs#L66

That call comes in via the IMetadataAsSourceFileService.GetGeneratedFileAsync, which is implemented here, and a File References on that should hopefully reveal where specific features call into it.

from fsharp.

vzarytovskii avatar vzarytovskii commented on June 9, 2024

F12 on anything from FSharp.Core or any other .NET library.

VS 17.10 Preview 1

Ugh, again...is it only decompiled metadata?

from fsharp.

kerams avatar kerams commented on June 9, 2024

Seems so

from fsharp.

vzarytovskii avatar vzarytovskii commented on June 9, 2024

It seems to be the issue because roslyn started calling our new IFSharpFindDefinitionService (related issue: #14675) instead of old service. It will be a bit harder to fix since before we were creating an on-demand metadata document, and now we need to provide a document and span.

from fsharp.

CyrusNajmabadi avatar CyrusNajmabadi commented on June 9, 2024

Adding @davidwengier our expert here

from fsharp.

davidwengier avatar davidwengier commented on June 9, 2024

Roslyn does the same basic process (source link, then decompilation, then metadata) but I don't think the decompilation system is extensible for other languages. The Source Link stuff might mostly work, but there are probably some gates on it only being done for C#/VB at the moment. For example, we create a project and rehydrate compilation options from the PDB as part of the process, so that stuff probably just fails.

from fsharp.

vzarytovskii avatar vzarytovskii commented on June 9, 2024

Roslyn does the same basic process (source link, then decompilation, then metadata) but I don't think the decompilation system is extensible for other languages. The Source Link stuff might mostly work, but there are probably some gates on it only being done for C#/VB at the moment. For example, we create a project and rehydrate compilation options from the PDB as part of the process, so that stuff probably just fails.

Ah, I see. Could you please point me to Roslyn's implementation? I see if I can make a workaround meanwhile.

from fsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.