Skip to content
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

Support http://www.symbolsource.org #1

Open
hmemcpy opened this issue Feb 24, 2014 · 10 comments
Open

Support http://www.symbolsource.org #1

hmemcpy opened this issue Feb 24, 2014 · 10 comments

Comments

@hmemcpy
Copy link

hmemcpy commented Feb 24, 2014

http://www.symbolsource.org/Public is a public reference provider for open source software.
It would be great if the extension could look up the source in it, if it fails to find it on the Microsoft reference source server.

@SLaks
Copy link
Owner

SLaks commented Feb 24, 2014

Yes; I want to do something like that.

However, I'll need some way to map a DLL on disk to the right project, and an HTML page that I can open with the symbol ID (as a doc comment ID or RQName) and redirect to actual source somewhere (GitHub?)

I don't think this is doable without some server-side architecture that does not yet exist.

@SLaks
Copy link
Owner

SLaks commented Feb 24, 2014

For my existing extensibility (which may need to be modified to make this more possible), see https://github.com/SLaks/Ref12/blob/master/Ref12/Services/ReferenceSourceProvider.cs#L15

@SLaks
Copy link
Owner

SLaks commented Feb 24, 2014

Alternatively, I could download the full symbol files on-demand, and open them in VS when you hit F12.
However, I would still need to figure out where to go from there.
I don't think there is any way to find the right NuGet / CodePlex project & tag?

@hmemcpy
Copy link
Author

hmemcpy commented Feb 24, 2014

I don't know yet, this was just off the top of my head, need to do some digging.
This is what R# does when you press F12 -- tries to grab from MS reference server, if fails, Symbolsource, otherwise decompiles.

What do you mean by "go from there", how to navigate to the correct method that was invoked?

@SLaks
Copy link
Owner

SLaks commented Feb 24, 2014

Yes.
Once I get the line number & filename from symbols, how/where do I display them?

@hmemcpy
Copy link
Author

hmemcpy commented Feb 24, 2014

I suppose just open the file with DTE, and navigate to the line :)
Too naive?

@SLaks
Copy link
Owner

SLaks commented Feb 24, 2014

What from?
Do you mean to download the individual source files from SymbolSource? (do they host source or just symbols?)

The problem with that approach is that it would be completely impossible to jump elsewhere in the target project (as opposed to opening on GitHub, which has a nice file browser)

@SLaks
Copy link
Owner

SLaks commented Feb 24, 2014

Also, ideally, I'd like to keep PDB logic server-side, so that addin itself would never actually download PDBs (for perf).
In other words, create an index file (like a.html) mapping symbol IDs to source files for an HTML redirector.

See http://blog.slaks.net/2014-02-24/dissecting-the-new-net-reference-source-browser/

@sharwell
Copy link

Symbol Source hosts both PDBs and the source files for projects. My estimate for a workflow is:

  1. Locate the DLL where the symbol is declared.
  2. If the symbol is declared in a packages folder alongside the solution, assume it is part of a NuGet package and get the package name from the directory name packages/{PackageNameAndVersion}. Use this information to try and locate the appropriate source package in Symbol Source (NuGet may provide a command out of the box to do this for you).
  3. Otherwise, assume the source is located in the Microsoft Reference Source.

@ctaggart
Copy link

I think my SourceLink.SymbolSource package can help out here. I just announced it. I'm happy to make a more C# friendly interface if you open and issue and propose an interface that you want.

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

4 participants