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

Different DocIDs between MSDN and Docs #288

Open
mairaw opened this issue Jul 11, 2018 · 6 comments
Open

Different DocIDs between MSDN and Docs #288

mairaw opened this issue Jul 11, 2018 · 6 comments
Labels

Comments

@mairaw
Copy link

mairaw commented Jul 11, 2018

We're finding some discrepancies on the DocID format for a couple of APIs.

Some examples:

Docs: M:System.Activities.Presentation.Model.ModelItemDictionary.System#Collections#Generic#ICollection<System#Collections#Generic#KeyValuePair<System#Activities#Presentation#Model#ModelItem,System#Activities#Presentation#Model#ModelItem>>#Add(System.Collections.Generic.KeyValuePair{System.Activities.Presentation.Model.ModelItem,System.Activities.Presentation.Model.ModelItem})

MSDN:
M:System.Activities.Presentation.Model.ModelItemDictionary.System#Collections#Generic#ICollection{System#Collections#Generic#KeyValuePair{System#Activities#Presentation#Model#ModelItem@System#Activities#Presentation#Model#ModelItem}}#Add(System.Collections.Generic.KeyValuePair{System.Activities.Presentation.Model.ModelItem,System.Activities.Presentation.Model.ModelItem})
 
Docs: M:System.Collections.Concurrent.ConcurrentDictionary`2.System#Collections#Generic#IDictionary<TKey,TValue>#Add(`0,`1)

MSDN:
M:System.Collections.Concurrent.ConcurrentDictionary`2.System#Collections#Generic#IDictionary{TKey@TValue}#Add(`0,`1)

Docs:
M:Microsoft.VisualBasic.Collection.IListAdd(System.Object)

MSDN:
M:Microsoft.VisualBasic.Collection.System#Collections#IList#Add(System.Object)

@mairaw
Copy link
Author

mairaw commented Jul 11, 2018

/cc @dend

@joelmartinez
Copy link
Member

joelmartinez commented Jul 11, 2018

Ok ... so there's a few things to unpack here. I made some sample projects that recreated these types, and had the compiler output the docXML.

  1. The first two seem to be using @ as a delimiter between generic instance types on MSDN. I don't know where this is coming from, because csc doesn't use that as the delimiter (and indeed, the only time it does is if the parameter for Add was ref or out, but then the @ was at the end of the parameter type, rather than in between the generic instance types). So for one reason or another, MSDN is using some non-standard form of docid
  2. For the 3rd example (IListAdd), this is a VB explicitly implemented member, and I verified that visual studio outputs M:Microsoft.VisualBasic.Collection.IListAdd(System.Object) as the docid. I think this is another instance where MSDN was using non-standard docids
  3. On the first one in your list, I verified that mono.cecil uses < and >, instead of { and } for those generic type instances (ie. what you're seeing on docs).

So for 1 and 2 (on my list), I think we're going to have to accept that MSDN was using values that don't align with what the compilers/roslyn is using ... if there's some sort of migration/redirect process that depends on these matching, that system is probably going to have to take these things into account.

For 3 on my list, in the long term, I can open a GH issue on the Mono.Cecil repository to bring this implementation into alignment with roslyn.

@joelmartinez
Copy link
Member

For the third on my list ... I've now opened this GH issue on mono.cecil:
jbevain/cecil#528

I will track that item, and incorporate it once the fix makes it in to a new release of mono.cecil.

@dend
Copy link

dend commented Jul 12, 2018

Looks like for (3) you already have a path to resolution @joelmartinez! Thank you for working on this.

@joelmartinez
Copy link
Member

I've implemented this fix in mono.cecil, and am now just waiting until it makes it into a released nuget so that I can reference it in a subsequent mdoc release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants