Skip to content

Commit

Permalink
Add workaround dotnet#1301
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Jul 6, 2021
1 parent f02a5b1 commit 8929ce1
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<FeatureSharedLowLevelLock>true</FeatureSharedLowLevelLock>
</PropertyGroup>
<PropertyGroup>
<FeatureGenericMath>true</FeatureGenericMath>
<!-- Depends on static virtual methods https://github.com/dotnet/runtimelab/issues/1301 -->
<!-- <FeatureGenericMath>true</FeatureGenericMath> -->
<DefineConstants Condition="'$(FeatureGenericMath)' == 'true'">$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
</PropertyGroup>

Expand Down
47 changes: 47 additions & 0 deletions src/libraries/System.Runtime/src/ApiCompatBaseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Workaround for https://github.com/dotnet/runtimelab/issues/1301
CannotRemoveBaseTypeOrInterface : Type 'System.Byte' does not implement interface 'System.IBinaryInteger<System.Byte>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Char' does not implement interface 'System.IBinaryInteger<System.Char>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.DateOnly' does not implement interface 'System.IComparisonOperators<System.DateOnly, System.DateOnly>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.DateTime' does not implement interface 'System.IAdditionOperators<System.DateTime, System.TimeSpan, System.DateTime>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.DateTimeOffset' does not implement interface 'System.IAdditionOperators<System.DateTimeOffset, System.TimeSpan, System.DateTimeOffset>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Decimal' does not implement interface 'System.IMinMaxValue<System.Decimal>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Double' does not implement interface 'System.IBinaryFloatingPoint<System.Double>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Guid' does not implement interface 'System.IComparisonOperators<System.Guid, System.Guid>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Half' does not implement interface 'System.IBinaryFloatingPoint<System.Half>' in the implementation but it does in the contract.
TypesMustExist : Type 'System.IAdditionOperators<TSelf, TOther, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IAdditiveIdentity<TSelf, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IBinaryFloatingPoint<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IBinaryInteger<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IBinaryNumber<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IBitwiseOperators<TSelf, TOther, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IComparisonOperators<TSelf, TOther>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IDecrementOperators<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IDivisionOperators<TSelf, TOther, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IEqualityOperators<TSelf, TOther>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IFloatingPoint<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IIncrementOperators<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IMinMaxValue<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IModulusOperators<TSelf, TOther, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IMultiplicativeIdentity<TSelf, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IMultiplyOperators<TSelf, TOther, TResult>' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Int16' does not implement interface 'System.IBinaryInteger<System.Int16>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Int32' does not implement interface 'System.IBinaryInteger<System.Int32>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Int64' does not implement interface 'System.IBinaryInteger<System.Int64>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.IntPtr' does not implement interface 'System.IBinaryInteger<System.IntPtr>' in the implementation but it does in the contract.
TypesMustExist : Type 'System.INumber<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IParseable<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IShiftOperators<TSelf, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ISignedNumber<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ISpanParseable<TSelf>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ISubtractionOperators<TSelf, TOther, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IUnaryNegationOperators<TSelf, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IUnaryPlusOperators<TSelf, TResult>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.IUnsignedNumber<TSelf>' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.SByte' does not implement interface 'System.IBinaryInteger<System.SByte>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Single' does not implement interface 'System.IBinaryFloatingPoint<System.Single>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.TimeOnly' does not implement interface 'System.IComparisonOperators<System.TimeOnly, System.TimeOnly>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.TimeSpan' does not implement interface 'System.IAdditionOperators<System.TimeSpan, System.TimeSpan, System.TimeSpan>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.UInt16' does not implement interface 'System.IBinaryInteger<System.UInt16>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.UInt32' does not implement interface 'System.IBinaryInteger<System.UInt32>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.UInt64' does not implement interface 'System.IBinaryInteger<System.UInt64>' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.UIntPtr' does not implement interface 'System.IBinaryInteger<System.UIntPtr>' in the implementation but it does in the contract.
2 changes: 2 additions & 0 deletions src/libraries/System.Runtime/src/System.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
<!-- Workaround for https://github.com/dotnet/runtimelab/issues/1301 -->
<GenFacadesIgnoreMissingTypes>true</GenFacadesIgnoreMissingTypes>
</PropertyGroup>
<ItemGroup>
<!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->
Expand Down

0 comments on commit 8929ce1

Please sign in to comment.