-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
C#: Include type parameters in MaD format for generics #14662
Conversation
Click to show differences in coveragecsharpGenerated file changes for csharp
- System,"``System.*``, ``System``",25,12149,65,7
+ System,"``System.*``, ``System``",25,11891,67,9
- Others,"``Dapper``, ``JsonToItemsTaskFactory``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NETCore.Platforms.BuildTasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``Windows.Security.Cryptography.Core``",,568,138,
+ Others,"``Dapper``, ``ILCompiler``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NETCore.Platforms.BuildTasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32.SafeHandles``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``Windows.Security.Cryptography.Core``",,1111,138,
- Totals,,25,12724,397,7
+ Totals,,25,13009,399,9
+ ILCompiler,,,80,,,,,,,,,,,,,,80,
+ Internal.IL,,,68,,,,,,,,,,,,,,66,2
+ Internal.Pgo,,,9,,,,,,,,,,,,,,8,1
+ Internal.TypeSystem,,,352,,,,,,,,,,,,,,316,36
+ Microsoft.Diagnostics.Tools.Pgo,,,12,,,,,,,,,,,,,,12,
- Microsoft.Extensions.Caching.Memory,,,46,,,,,,,,,,,,,,45,1
+ Microsoft.Extensions.Caching.Memory,,,38,,,,,,,,,,,,,,37,1
- Microsoft.Extensions.Configuration,,,83,,,,,,,,,,,,,,80,3
+ Microsoft.Extensions.Configuration,,,79,,,,,,,,,,,,,,76,3
- Microsoft.Extensions.DependencyInjection,,,62,,,,,,,,,,,,,,62,
+ Microsoft.Extensions.DependencyInjection,,,60,,,,,,,,,,,,,,60,
- Microsoft.Extensions.FileProviders,,,16,,,,,,,,,,,,,,16,
+ Microsoft.Extensions.FileProviders,,,17,,,,,,,,,,,,,,17,
- Microsoft.Extensions.FileSystemGlobbing,,,15,,,,,,,,,,,,,,13,2
+ Microsoft.Extensions.FileSystemGlobbing,,,16,,,,,,,,,,,,,,14,2
- Microsoft.Extensions.Hosting,,,17,,,,,,,,,,,,,,16,1
+ Microsoft.Extensions.Hosting,,,20,,,,,,,,,,,,,,19,1
- Microsoft.Extensions.Logging,,,37,,,,,,,,,,,,,,37,
+ Microsoft.Extensions.Logging,,,39,,,,,,,,,,,,,,39,
- Microsoft.Interop,,,27,,,,,,,,,,,,,,27,
+ Microsoft.Interop,,,60,,,,,,,,,,,,,,60,
- Microsoft.Win32,,,8,,,,,,,,,,,,,,8,
+ Microsoft.Win32.SafeHandles,,,4,,,,,,,,,,,,,,4,
- System,65,25,12149,,8,8,9,,,4,3,33,1,17,3,4,10163,1986
+ System,67,25,11891,,8,8,9,,,4,5,33,1,17,3,4,9906,1985 |
510a38a
to
de1f2c8
Compare
fcf2cb1
to
e33e414
Compare
e33e414
to
5ae025f
Compare
extensions: | ||
{0}""" | ||
for entry in extensions: | ||
target = os.path.join(self.generatedFrameworks, entry + extension) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you also try running this for java?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are interested then you can run modify the mad_modelDiff.yml
workflow file to also be triggered on the shared python code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to run that on my PR branch, do you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just change the paths section of the workflow file? If that doesn't work - then I don't know.
|
@@ -66,8 +66,8 @@ extensions: | |||
- ["System.Collections.Generic", "SortedDictionary<TKey,TValue>", False, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"] | |||
- ["System.Collections.Generic", "SortedDictionary<TKey,TValue>+KeyCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.SortedDictionary<,>+KeyCollection+Enumerator.Current]", "value", "manual"] | |||
- ["System.Collections.Generic", "SortedDictionary<TKey,TValue>+ValueCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.SortedDictionary<,>+ValueCollection+Enumerator.Current]", "value", "manual"] | |||
- ["System.Collections.Generic", "SortedList<,>+KeyList", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you searched all the yaml files using the regex <,*>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; the only remaining occurrences should be those inside a Property
or Field
token, e.g.
["System.Collections.Generic", "Dictionary<TKey,TValue>", False, "Add", "(System.Collections.Generic.KeyValuePair<TKey,TValue>)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
This will change to
["System.Collections.Generic", "Dictionary<TKey,TValue>", False, "Add", "(System.Collections.Generic.KeyValuePair<TKey,TValue>)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Key]", "value", "manual"]
once #14589 lands.
That would be the auto-generated summaries from 136adb2.
Already did :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for doing this! 👍
This PR changes the MaD format used for generics, to include the names of the type parameters, in both generic types and generic methods. For example, instead of writing
we now instead write
This aligns with the official documentation, and also makes it clear what type parameters in signatures refer to.
The PR is best reviewed commit-by-commit:
dotnet/runtime
models using new format.