-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Confusing behaviour with types that have both generic and non-generic versions #189
Comments
This looks like a problem caused by both |
Interesting, indeed there's some weirdness here. On https://referencesource.microsoft.com it works better. Compare: I usually search for generic types by appending the |
Alex, you're correct, it does appear that the file hierarchy is flattened, but why is this happening? SourceBrowser should be preserving the hierarchy within a project. |
Oh, I'm guessing .shproj (shared projects) are involved. https://github.com/dotnet/runtime/tree/4c92aef2b08f9c4374c520e7e664a44f1ad8ce56/src/libraries/System.Private.CoreLib/src We might not have the best in the world support for shared projects honestly. Worth looking into this. |
its not technically a shproj, because its been processed with my binlig -> sln translation stuff, but all the files that are flattened are in the csproj like this: |
I can share the full solution if it would be helpful, but its somewhat large. |
ah, yes, linked files from outside the project cone would be flattened, that explains it. We should probably try and respect the metadata to properly recreate the "virtual" subdirectory of linked files. |
In this case there is no metadata, because the project file is a recreation based on the compiler invocation. Roslyn respects Link metadata if it exists IIRC. |
I might be able to.... reconstruct the link metadata somehow, but I don't know a way to do that in general. I could make the tool find a common prefix for all the files and use that as the "root" and produce Link metadata from that, but it probably wouldn't work perfectly. It might still work "good enough" to prevent same-name files from clashing. |
I think if you have the path for the csproj (which you should have) then each .cs path is relative to the .csproj. You can fiddle with relative paths and compute the Link metadata for those outside the project cone. We can brainstorm this together if you like. |
I ran into a couple of weird issues at source.dot.net:
IEnumerable<T>
(I tried with and without namespace, with and without namespace assembly name etc),List<T>
page both links toIList<T>
andIList
point to the same page (IList<T>
),IList<T>
page link toICollection<T>
points to the non-genericICollection
,IEnumerable<T>
(example) point to error page (which saysDon't use this page directly, pass #symbolId to get redirected.
)All pointed issues are applicable for all interfaces that have both generic and non-generic versions (
IEnumerator
,IEqualityComparer
etc).The issue is probably related to #179.
The text was updated successfully, but these errors were encountered: