Update references assemblies to include private fields for structs#26286
Conversation
|
For reference the tools change is dotnet/buildtools#1859 |
|
|
||
| <PropertyGroup Condition="'$(IsReferenceAssembly)' == 'true'"> | ||
| <!-- disable warnings about unused fields --> | ||
| <NoWarn>$(NoWarn);0169;0649</NoWarn> |
There was a problem hiding this comment.
Delete this from System.Runtime.csproj now that it is centrally defined?
|
|
||
| namespace System.ComponentModel.Composition | ||
| { | ||
| public static partial class AdaptationConstants |
There was a problem hiding this comment.
@maryamariyan when I regenerated the ref for System.ComponentModel.Composition a few more public API showed up. Can you confirm you didn't intentionally exclude them originally.?
| @@ -82,17 +82,17 @@ public enum MethodSemanticsAttributes | |||
| } | |||
| namespace System.Reflection.Metadata | |||
There was a problem hiding this comment.
@tmat @nguerrera could you guys please have a scan over the changes to this ref?
There was a problem hiding this comment.
I took a look and it looks fine.
| // ------------------------------------------------------------------------------ | ||
|
|
||
|
|
||
| namespace System.Security.Cryptography |
There was a problem hiding this comment.
@bartonjs would you mind having a scan over the crypto ref's I've regenerated?
| public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } | ||
| } | ||
| public partial struct ConfiguredValueTaskAwaitable<TResult> | ||
| public readonly partial struct ConfiguredValueTaskAwaitable<TResult> |
There was a problem hiding this comment.
@stephentoub while regenerating this a few things got marked as readonly I assume that is more leftover from your other work. In this ref ConfiguredValueTaskAwaiter and ValueTaskAwaiter<TResult> also got marked as readonly based on what the netstandard implementation is but they aren't marked that way in corelib, so I undid it in the ref. Please feel free to make the consistent as you deem fit.
2bb1b19 to
2e97d43
Compare
| public sealed partial class SafeX509ChainHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid | ||
| { | ||
| internal SafeX509ChainHandle() : base(default(bool)) { } | ||
| public override bool IsInvalid { get { throw null; } } |
There was a problem hiding this comment.
I assume the override was "removed" because the type is sealed (so there's no base.IsInvalid concern)?
There was a problem hiding this comment.
it was removed because it wasn't in the implementation.
There was a problem hiding this comment.
Ah. That would be a good reason, too 😄.
Looks like when we brought back SafeHandleZeroOrMinusOneIsInvalid the override was removed from the src copy but not the ref.
Blob has fields of both reference and value types: byte[] and int. I assume that once there is a _dummy of a reference type we don't need to also add a value type _dummy, but the rules here do not mention that: dotnet/buildtools#1859 Refers to: src/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs:208 in 2e97d43. [](commit_id = 2e97d43, deletion_comment = False) |
If it already has the reference one we don't need the value type one for the compiler to do it's job.
For the generic fields I just copy them as is because I didn't want to normalize their types. |
|
Re the generic types - my only concern is using compiler generated names of the property backing fields (in theory they might change in next compiler version). |
I don't expect that the name will be used for anything so I don't think it matters. |
…ieldsForStructsInRefs Update references assemblies to include private fields for structs Commit migrated from dotnet/corefx@9d32b61
Contributes to https://github.com/dotnet/corefx/issues/6185.
This is an update to the rest of the reference assemblies in corefx. I updated every reference assembly that as a struct with any private fields. Some of the refs that weren't easy to regenerate I did targeted fixes for and others I regenerated with the latest tools so there are some other normalization changes in some of the refs.
PTAL @jkotas @VSadov @jaredpar @gafter @tmat @nguerrera