question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confusing behaviour with types that have both generic and non-generic versions

See original GitHub issue

I ran into a couple of weird issues at source.dot.net:

  1. It’s impossible to find IEnumerable<T> (I tried with and without namespace, with and without namespace assembly name etc),
  2. In the List<T> page both links to IList<T> and IList point to the same page (IList<T>),
  3. In the IList<T> page link to ICollection<T> points to the non-generic ICollection,
  4. A lot of references to IEnumerable<T> (example) point to error page (which says Don'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 https://github.com/KirillOsenkov/SourceBrowser/issues/179.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
alexperovichcommented, Jul 13, 2021

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: ..\..\libraries\System.Private.CoreLib\src\System\Activator.cs so I bet thats the problem. Its showing up as a “linked” file without any link.

0reactions
KirillOsenkovcommented, Jul 13, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to implement both generic and non-generic version of ...
1 Answer. That way the generic version is a more specified subtype of the non-generic one allowing you to put more information in...
Read more >
Documentation - Type Compatibility
For generic types that do not have their type arguments specified, compatibility is checked by specifying any in place of all unspecified type...
Read more >
Java Generics FAQs - Under The Hood Of The Compiler
For instance, if "legacy" code uses types such as List , which used to be a regular (non-generic) types before Java 5.0, but...
Read more >
PEP 695 – Type Parameter Syntax
When a type parameter is shared among multiple generic classes, functions, and type aliases, all references are semantically equivalent.
Read more >
Generics can make your Go code slower
As the design document states, two concrete types are in the same gcshape grouping if and only if they have the same underlying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found