dotnet / source-indexer

This repo contains the code for building http://source.dot.net
MIT License
51 stars 37 forks source link

Some symbols don't resolve that should #174

Open ericstj opened 1 month ago

ericstj commented 1 month ago

@stephentoub and I were looking at MemoryExtensions.Count. For example: https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs,4009

You cannot search for this method, but you can navigate to it from the class name. When clicking on the name of the member it does nothing: https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs,b6c053206fec6870

The method body does also not resolve the called method. image

Perhaps roslyn is having difficulty with syntax in this file (eg: we need a newer roslyn in the indexer?) or maybe some other problem is making it not possible to index. I tried to find logs mentioning any problems with these types from the index build but didn't see anything. Maybe we could try opening the stage1 solution to see if there's an issue.

PathogenDavid commented 1 month ago

I've encountered a similar issues with other symbols. Although in my cases the search still works (but clicking on symbols doesn't) so maybe there's multiple issues at play here.

Copy+pasted from my other comment: https://github.com/dotnet/source-indexer/issues/138#issuecomment-2259107397

It seems things still aren't quite right with WinForms. For example references in System.Windows.Forms to methods/types in System.Windows.Forms.Primitives do not resolve.

For example, see Application.SetHighDpiMode. Clicking on ScaleHelper.SetProcessHighDpiMode does not navigate to them as you'd expect.

You can manually navigate to it by searching for it, so the type was indexed it's just the cross reference link is missing for some reason. (The references are also broken in the other direction -- SetProcessHighDpiMode is never referenced outside of documentation according to the source browser.)

This is true of many other things in this file, such as RunMessageLoop, all the PInvoke methods, msoloop, etc. (RunMessageLoop stands out as it appears to be from the same assembly, so not sure what's up with it.)

And today I found another not in WinForms, hence this comment:

In System.String.GetHashCode you can navigate to Marvin, but not ComputeHash32. Similar to the WinForms examples above, if you manually navigate to Marvin.ComputeHash32 and inspect its references, the System.String.GetHashCode reference is missing.