dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.06k stars 4.69k forks source link

Port System.Collections docs for .NET 9 APIs #105976

Open carlossanlop opened 1 month ago

carlossanlop commented 1 month ago

Below is the list of APIs that still show up as undocumented in dotnet-api-docs and were introduced in .NET 9.

Full porting instructions can be found in the main issue.

This task needs to be finished the day before the RC2 snap (September 15th).

RC1 APIs as of 2024/10/01: https://github.com/dotnet/runtime/issues/105976#issuecomment-2387133568

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-system-collections See info in area-owners.md if you want to be subscribed.

carlossanlop commented 1 month ago

Here's a PR that ports some that we missed in the first pass: https://github.com/dotnet/dotnet-api-docs/pull/10209

carlossanlop commented 1 month ago

P7 Undoc APIs as of 08/20:

Summary Parameters TypeParameters ReturnValue API
Missing Missing Missing Missing M:System.Collections.Concurrent.ConcurrentDictionary2.TryGetAlternateLookup1(System.Collections.Concurrent.ConcurrentDictionary2.AlternateLookup{0,1,0}@)
Present NA Missing NA T:System.Collections.Concurrent.ConcurrentDictionary2.AlternateLookup1
Present Present NA Missing M:System.Collections.Concurrent.ConcurrentDictionary2.AlternateLookup1.TryGetValue(2,0@,1@)
Present Present NA Missing M:System.Collections.Concurrent.ConcurrentDictionary2.AlternateLookup1.TryGetValue(2,1@)
Missing Missing Missing Missing M:System.Collections.Frozen.FrozenDictionary2.TryGetAlternateLookup1(System.Collections.Frozen.FrozenDictionary2.AlternateLookup{0,1,0}@)
Present NA Missing NA T:System.Collections.Frozen.FrozenDictionary2.AlternateLookup1
Present Present NA Missing M:System.Collections.Frozen.FrozenDictionary2.AlternateLookup1.TryGetValue(2,1@)
Missing Missing Missing Missing M:System.Collections.Frozen.FrozenSet1.TryGetAlternateLookup1(System.Collections.Frozen.FrozenSet1.AlternateLookup{0,0}@)
Present NA Missing NA T:System.Collections.Frozen.FrozenSet1.AlternateLookup1
Present NA Missing NA T:System.Collections.Generic.Dictionary2.AlternateLookup1
Present Present NA Missing M:System.Collections.Generic.Dictionary2.AlternateLookup1.TryGetValue(2,1@)
Present Present NA Missing M:System.Collections.Generic.Dictionary2.AlternateLookup1.TryGetValue(2,0@,1@)
Present NA Missing NA T:System.Collections.Generic.HashSet1.AlternateLookup1
Present Missing NA Present M:System.Collections.Generic.OrderedDictionary2.KeyCollection.Contains(0)
eiriktsarpalis commented 1 month ago

With the exception of all the TryGetValue methods, everything else in this table appears to be documented in source, for example the entry in the first row:

https://github.com/dotnet/runtime/blob/d7566920bd6ee0d5fda9f92600e96fc0c4d8aebc/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs#L247-L258

Running the tool again locally seems to be skipping over these missing docs as well. @carlossanlop any suggestions or should I just port the missing docs manually?

carlossanlop commented 1 month ago

Running the tool again locally seems to be skipping over these missing docs as well. @carlossanlop any suggestions or should I just port the missing docs manually?

That's not good. What command were you using? Do any of the APIs live under System.Private.CoreLib?

eiriktsarpalis commented 1 month ago

I followed the instructions from the parent issue. Some APIs are SPCL but others are regular libs so I don't think it's related.

carlossanlop commented 1 day ago

Reopening as there were new APIs introduced in RC1. @eiriktsarpalis

API Summary Parameters TypeParameters ReturnValue
T:System.Collections.Concurrent.ConcurrentDictionary2.AlternateLookup1 Present NA Missing NA
T:System.Collections.Frozen.FrozenDictionary2.AlternateLookup1 Present NA Missing NA
T:System.Collections.Frozen.FrozenSet1.AlternateLookup1 Present NA Missing NA
M:System.Collections.Generic.Dictionary2.GetAlternateLookup1 Missing NA Missing Missing
M:System.Collections.Generic.Dictionary2.TryGetAlternateLookup1(System.Collections.Generic.Dictionary2.AlternateLookup{0,1,0}@) Missing Missing Missing Missing
T:System.Collections.Generic.Dictionary2.AlternateLookup1 Present NA Missing NA
M:System.Collections.Generic.Dictionary2.AlternateLookup1.TryGetValue(2,0@,1@) Present Present NA Missing
M:System.Collections.Generic.Dictionary2.AlternateLookup1.TryGetValue(2,1@) Present Present NA Missing
M:System.Collections.Generic.HashSet1.GetAlternateLookup1 Missing NA Missing Missing
M:System.Collections.Generic.HashSet1.TryGetAlternateLookup1(System.Collections.Generic.HashSet1.AlternateLookup{0,0}@) Missing Missing Missing Missing
T:System.Collections.Generic.HashSet1.AlternateLookup1 Present NA Missing NA