Open ahsonkhan opened 5 years ago
Caused by https://github.com/dotnet/arcade/pull/2029 @pakrym
I vaguely remember looking at this before and found that the signature used by corelib here will never be emitted by the C# compiler when using (, ...)
syntax. It always wraps the 8th item in another ValueTuple. Do you remember looking into this @safern?
We could workaround it with a manual file, but I believe that ultimately this is a bug in https://github.com/dotnet/arcade/pull/2029, since that's not producing C# that compiles back to the same metadata.
I haven’t special cased this in my changes yet, but I think we should be able to fix this by special casing it. I’ll take care of this as I’m already touching a lot of it now.
From https://github.com/dotnet/corefx/pull/39681#issuecomment-514016734
If we generate the System.Runtime ref using GenAPI, it uses
( , )
syntax to representValueTuple
and hence changes the following type definition within the ref, along with the interface methods: https://github.com/dotnet/corefx/blob/0e91120b1b2c7b8af1357e06b33b74747fd99151/src/System.Runtime/ref/System.Runtime.cs#L3714This causes API compat to fail with the following error, even though the implementation (within corelib) hasn't changed and still satisfies the interface: https://github.com/dotnet/corefx/blob/0e91120b1b2c7b8af1357e06b33b74747fd99151/src/Common/src/CoreLib/System/ValueTuple.cs#L2057
Note: This is only a problem for
ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>
, where the number of generics is over 7, and we haveTRest
. For the other types such asValueTuple<T1>
,ValueTuple<T1, T2>
, etc. using the( , )
notation to represent ValueTuples works fine.Do we need to special case that into a manual ref file?
cc @ericstj