From 89c9817f52220492f167c368633939ce82b08e56 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 21 Dec 2022 11:27:03 +0100 Subject: [PATCH 01/15] WIP - MakeStructTupleType without assembly argument and without locking --- src/FSharp.Core/reflect.fs | 37 +++++++++++++++++++++++++++++++++++++ src/FSharp.Core/reflect.fsi | 10 ++++++++++ 2 files changed, 47 insertions(+) diff --git a/src/FSharp.Core/reflect.fs b/src/FSharp.Core/reflect.fs index e9522f68c99..9da88fb0c55 100644 --- a/src/FSharp.Core/reflect.fs +++ b/src/FSharp.Core/reflect.fs @@ -743,6 +743,40 @@ module internal Impl = table.[7].MakeGenericType(Array.append tysA [| tyB |]) | _ -> invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) + + let refTupleTypesNetStandard = + [| typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> |] + + let structTupleTypesNetStandard = + [| typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> |] + + let rec mkTupleTypeNetStandard (tupleTable:Type[]) (tys: Type[]) = + let tableIndex = tys.Length - 1 + if tableIndex < 0 then + invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) + elif tableIndex < (tupleTable.Length-1) then + tupleTable[tableIndex].MakeGenericType tys + else + let + let tysA = tys.[0 .. tupleEncField - 1] + invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) + + + let rec getTupleTypeInfo (typ: Type) = if not (isTupleType typ) then let msg = String.Format(SR.GetString(SR.notATupleType), typ.FullName) @@ -1195,6 +1229,7 @@ type FSharpType = mkTupleType false asm types + [] static member MakeStructTupleType(asm: Assembly, types: Type[]) = checkNonNull "types" types @@ -1208,6 +1243,8 @@ type FSharpType = mkTupleType true asm types + static member MakeStructTupleType(types: Type[]) = FSharpType.MakeStructTupleType(null,types) + static member GetTupleElements(tupleType: Type) = checkTupleType ("tupleType", tupleType) getTupleTypeInfo tupleType diff --git a/src/FSharp.Core/reflect.fsi b/src/FSharp.Core/reflect.fsi index 881c95331c9..3bd1cd023ab 100644 --- a/src/FSharp.Core/reflect.fsi +++ b/src/FSharp.Core/reflect.fsi @@ -617,8 +617,18 @@ type FSharpType = /// The type representing the struct tuple containing the input elements. /// /// + [] static member MakeStructTupleType: asm: Assembly * types: Type[] -> Type + /// Returns a representing an F# struct tuple type with the given element types + /// + /// An array of types for the tuple elements. + /// + /// The type representing the struct tuple containing the input elements. + /// + /// + static member MakeStructTupleType: types: Type[] -> Type + /// Return true if the typ is a representation of an F# tuple type /// /// The type to check. From 0972976db42ae675d035e1c1c0f5e2ae05715412 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 21 Dec 2022 15:58:20 +0100 Subject: [PATCH 02/15] FsharpCore reflection > Create struct tuple Type without passing Assembly --- src/FSharp.Core/Linq.fs | 2 +- src/FSharp.Core/quotations.fs | 8 + src/FSharp.Core/quotations.fsi | 17 ++ src/FSharp.Core/reflect.fs | 270 ++++++++++-------- src/FSharp.Core/reflect.fsi | 3 +- .../FSharpQuotations.fs | 14 + .../FSharpReflection.fs | 18 ++ tests/FSharp.Core.UnitTests/SurfaceArea.fs | 2 + 8 files changed, 206 insertions(+), 128 deletions(-) diff --git a/src/FSharp.Core/Linq.fs b/src/FSharp.Core/Linq.fs index 6b62eccb93e..0e58b7911cb 100644 --- a/src/FSharp.Core/Linq.fs +++ b/src/FSharp.Core/Linq.fs @@ -740,7 +740,7 @@ module LeafExpressionConverter = let tupTy = let argTypes = args |> List.map (fun arg -> arg.Type) |> Array.ofList if inp.Type.IsValueType then - Reflection.FSharpType.MakeStructTupleType(inp.Type.Assembly, argTypes) + Reflection.FSharpType.MakeStructTupleType(argTypes) else Reflection.FSharpType.MakeTupleType(argTypes) let argsP = ConvExprsToLinq env args diff --git a/src/FSharp.Core/quotations.fs b/src/FSharp.Core/quotations.fs index 20f2e8ca06b..e67639da399 100644 --- a/src/FSharp.Core/quotations.fs +++ b/src/FSharp.Core/quotations.fs @@ -1131,6 +1131,10 @@ module Patterns = let ty = FSharpType.MakeStructTupleType(asm, Array.map typeOf (Array.ofList args)) mkFEN (NewTupleOp ty) args + let mkNewStructTupleNetStandard args = + let ty = FSharpType.MakeStructTupleType(Array.map typeOf (Array.ofList args)) + mkFEN (NewTupleOp ty) args + let mkTupleGet (ty, n, x) = checkTypesSR ty (typeOf x) "tupleGet" (SR.GetString(SR.QtmmExprNotMatchTuple)) let mems = FSharpType.GetTupleElements ty @@ -2662,9 +2666,13 @@ type Expr with static member NewTuple elements = mkNewTuple elements + // Obsolete in .fsi static member NewStructTuple(asm: Assembly, elements) = mkNewStructTuple (asm, elements) + static member NewStructTuple elements = + mkNewStructTupleNetStandard elements + static member NewRecord(recordType: Type, elements) = checkNonNull "recordType" recordType mkNewRecord (recordType, elements) diff --git a/src/FSharp.Core/quotations.fsi b/src/FSharp.Core/quotations.fsi index 5ec624e1438..ba6f5a69c5d 100644 --- a/src/FSharp.Core/quotations.fsi +++ b/src/FSharp.Core/quotations.fsi @@ -671,8 +671,25 @@ type Expr = /// /// Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. /// + [] static member NewStructTuple: asm: Assembly * elements: Expr list -> Expr + /// Builds an expression that represents the creation of an F# tuple value + /// + /// The list of elements of the tuple. + /// + /// The resulting expression. + /// + /// + /// + /// open FSharp.Quotations + /// + /// Expr.NewStructTuple( [ <@ 1 @>; <@ "a" @> ]) + /// + /// Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. + /// + static member NewStructTuple: elements: Expr list -> Expr + /// Builds record-construction expressions /// /// The type of record. diff --git a/src/FSharp.Core/reflect.fs b/src/FSharp.Core/reflect.fs index 9da88fb0c55..473dc3b3c87 100644 --- a/src/FSharp.Core/reflect.fs +++ b/src/FSharp.Core/reflect.fs @@ -628,27 +628,6 @@ module internal Impl = //----------------------------------------------------------------- // TUPLE DECOMPILATION - let tupleNames = - [| - "System.Tuple`1" - "System.Tuple`2" - "System.Tuple`3" - "System.Tuple`4" - "System.Tuple`5" - "System.Tuple`6" - "System.Tuple`7" - "System.Tuple`8" - "System.Tuple" - "System.ValueTuple`1" - "System.ValueTuple`2" - "System.ValueTuple`3" - "System.ValueTuple`4" - "System.ValueTuple`5" - "System.ValueTuple`6" - "System.ValueTuple`7" - "System.ValueTuple`8" - "System.ValueTuple" - |] let simpleTupleNames = [| @@ -679,103 +658,137 @@ module internal Impl = // used in F# type providers. typ.IsGenericType && typ.Namespace = "System" - && simpleTupleNames |> Seq.exists typ.Name.StartsWith + && simpleTupleNames |> Array.exists typ.Name.StartsWith let maxTuple = 8 // Which field holds the nested tuple? let tupleEncField = maxTuple - 1 - let dictionaryLock = obj () - let refTupleTypes = Dictionary() - let valueTupleTypes = Dictionary() - - let rec mkTupleType isStruct (asm: Assembly) (tys: Type[]) = - let table = - let makeIt n = - let tupleFullName n = - let structOffset = if isStruct then 9 else 0 - let index = n - 1 + structOffset - tupleNames.[index] - - match n with - | 1 -> asm.GetType(tupleFullName 1) - | 2 -> asm.GetType(tupleFullName 2) - | 3 -> asm.GetType(tupleFullName 3) - | 4 -> asm.GetType(tupleFullName 4) - | 5 -> asm.GetType(tupleFullName 5) - | 6 -> asm.GetType(tupleFullName 6) - | 7 -> asm.GetType(tupleFullName 7) - | 8 -> asm.GetType(tupleFullName 8) - | _ -> invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) - - let tables = - if isStruct then - valueTupleTypes - else - refTupleTypes - - match lock dictionaryLock (fun () -> tables.TryGetValue asm) with - | false, _ -> - // the Dictionary<>s here could be ConcurrentDictionary<>'s, but then - // that would lock while initializing the Type array (maybe not an issue) - let mutable a = Array.init 8 (fun i -> makeIt (i + 1)) - - lock dictionaryLock (fun () -> - match tables.TryGetValue asm with - | true, t -> a <- t - | false, _ -> tables.Add(asm, a)) - - a - | true, t -> t - - match tys.Length with - | 1 -> table.[0].MakeGenericType tys - | 2 -> table.[1].MakeGenericType tys - | 3 -> table.[2].MakeGenericType tys - | 4 -> table.[3].MakeGenericType tys - | 5 -> table.[4].MakeGenericType tys - | 6 -> table.[5].MakeGenericType tys - | 7 -> table.[6].MakeGenericType tys - | n when n >= maxTuple -> - let tysA = tys.[0 .. tupleEncField - 1] - let tysB = tys.[maxTuple - 1 ..] - let tyB = mkTupleType isStruct asm tysB - table.[7].MakeGenericType(Array.append tysA [| tyB |]) - | _ -> invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) - - - let refTupleTypesNetStandard = - [| typedefof> - typedefof> - typedefof> - typedefof> - typedefof> - typedefof> - typedefof> - typedefof> |] - - let structTupleTypesNetStandard = - [| typedefof> - typedefof> - typedefof> - typedefof> - typedefof> - typedefof> - typedefof> - typedefof> |] - - let rec mkTupleTypeNetStandard (tupleTable:Type[]) (tys: Type[]) = - let tableIndex = tys.Length - 1 - if tableIndex < 0 then - invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) - elif tableIndex < (tupleTable.Length-1) then - tupleTable[tableIndex].MakeGenericType tys - else - let - let tysA = tys.[0 .. tupleEncField - 1] - invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) - - + module internal ObsoleteTupleTypeMaking = + let private tupleNames = + [| + "System.Tuple`1" + "System.Tuple`2" + "System.Tuple`3" + "System.Tuple`4" + "System.Tuple`5" + "System.Tuple`6" + "System.Tuple`7" + "System.Tuple`8" + "System.Tuple" + "System.ValueTuple`1" + "System.ValueTuple`2" + "System.ValueTuple`3" + "System.ValueTuple`4" + "System.ValueTuple`5" + "System.ValueTuple`6" + "System.ValueTuple`7" + "System.ValueTuple`8" + "System.ValueTuple" + |] + + let private dictionaryLock = obj () + let private refTupleTypes = Dictionary() + let private valueTupleTypes = Dictionary() + + let rec mkTupleType isStruct (asm: Assembly) (tys: Type[]) = + let table = + let makeIt n = + let tupleFullName n = + let structOffset = if isStruct then 9 else 0 + let index = n - 1 + structOffset + tupleNames.[index] + + match n with + | 1 -> asm.GetType(tupleFullName 1) + | 2 -> asm.GetType(tupleFullName 2) + | 3 -> asm.GetType(tupleFullName 3) + | 4 -> asm.GetType(tupleFullName 4) + | 5 -> asm.GetType(tupleFullName 5) + | 6 -> asm.GetType(tupleFullName 6) + | 7 -> asm.GetType(tupleFullName 7) + | 8 -> asm.GetType(tupleFullName 8) + | _ -> invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) + + let tables = + if isStruct then + valueTupleTypes + else + refTupleTypes + + match lock dictionaryLock (fun () -> tables.TryGetValue asm) with + | false, _ -> + // the Dictionary<>s here could be ConcurrentDictionary<>'s, but then + // that would lock while initializing the Type array (maybe not an issue) + let mutable a = Array.init 8 (fun i -> makeIt (i + 1)) + + lock dictionaryLock (fun () -> + match tables.TryGetValue asm with + | true, t -> a <- t + | false, _ -> tables.Add(asm, a)) + + a + | true, t -> t + + match tys.Length with + | 1 -> table.[0].MakeGenericType tys + | 2 -> table.[1].MakeGenericType tys + | 3 -> table.[2].MakeGenericType tys + | 4 -> table.[3].MakeGenericType tys + | 5 -> table.[4].MakeGenericType tys + | 6 -> table.[5].MakeGenericType tys + | 7 -> table.[6].MakeGenericType tys + | n when n >= maxTuple -> + let tysA = tys.[0 .. tupleEncField - 1] + let tysB = tys.[maxTuple - 1 ..] + let tyB = mkTupleType isStruct asm tysB + table.[7].MakeGenericType(Array.append tysA [| tyB |]) + | _ -> invalidArg "tys" (SR.GetString(SR.invalidTupleTypes)) + + let refTupleTypesNetStandard = + [| + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + |] + + let structTupleTypesNetStandard = + [| + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + typedefof> + |] + + /// Index of the recursively-nested Tuple type within the table of types + [] + let nestedTupIndex = 7 + + /// Index of the last regular (non-nested) tuple type within the table of types + [] + let lastRegularTupIndex = 6 //nestedTupIndex - 1 (wait for arithmetic in constants) + + let rec mkTupleTypeNetStandard (tupTyTbl: Type[]) (tys: Type[]) = + let tblIdx = tys.Length - 1 + assert (tblIdx >= 0) + assert (nestedTupIndex = tupTyTbl.Length - 1) + + match tblIdx with + | idx when idx < nestedTupIndex -> tupTyTbl[ idx ].MakeGenericType tys + | _ -> + let tysA = tys.[0..lastRegularTupIndex] + let tysB = tys.[nestedTupIndex..] + let tyB = mkTupleTypeNetStandard tupTyTbl tysB + tupTyTbl.[nestedTupIndex].MakeGenericType([| yield! tysA; yield tyB |]) let rec getTupleTypeInfo (typ: Type) = if not (isTupleType typ) then @@ -1203,19 +1216,15 @@ type FSharpType = static member MakeTupleType(types: Type[]) = checkNonNull "types" types - // No assembly passed therefore just get framework local version of Tuple - let asm = typeof.Assembly + if types.Length = 0 then + invalidArg "types" (SR.GetString(SR.invalidTupleTypes)) - if - types - |> Array.exists (function - | null -> true - | _ -> false) - then + if types |> Array.exists isNull then invalidArg "types" (SR.GetString(SR.nullsNotAllowedInArray)) - mkTupleType false asm types + mkTupleTypeNetStandard refTupleTypesNetStandard types + // Obsolete in .fsi static member MakeTupleType(asm: Assembly, types: Type[]) = checkNonNull "types" types @@ -1227,9 +1236,9 @@ type FSharpType = then invalidArg "types" (SR.GetString(SR.nullsNotAllowedInArray)) - mkTupleType false asm types + ObsoleteTupleTypeMaking.mkTupleType false asm types - [] + // Obsolete in .fsi static member MakeStructTupleType(asm: Assembly, types: Type[]) = checkNonNull "types" types @@ -1241,9 +1250,18 @@ type FSharpType = then invalidArg "types" (SR.GetString(SR.nullsNotAllowedInArray)) - mkTupleType true asm types + ObsoleteTupleTypeMaking.mkTupleType true asm types + + static member MakeStructTupleType(types: Type[]) = + checkNonNull "types" types + + if types.Length = 0 then + invalidArg "types" (SR.GetString(SR.invalidTupleTypes)) + + if types |> Array.exists isNull then + invalidArg "types" (SR.GetString(SR.nullsNotAllowedInArray)) - static member MakeStructTupleType(types: Type[]) = FSharpType.MakeStructTupleType(null,types) + mkTupleTypeNetStandard structTupleTypesNetStandard types static member GetTupleElements(tupleType: Type) = checkTupleType ("tupleType", tupleType) diff --git a/src/FSharp.Core/reflect.fsi b/src/FSharp.Core/reflect.fsi index 3bd1cd023ab..e5fa8b56579 100644 --- a/src/FSharp.Core/reflect.fsi +++ b/src/FSharp.Core/reflect.fsi @@ -607,6 +607,7 @@ type FSharpType = /// The type representing the tuple containing the input elements. /// /// + [] static member MakeTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types @@ -626,7 +627,7 @@ type FSharpType = /// /// The type representing the struct tuple containing the input elements. /// - /// + /// static member MakeStructTupleType: types: Type[] -> Type /// Return true if the typ is a representation of an F# tuple type diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs index 02a3070d497..a8ea2816a73 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs @@ -120,6 +120,20 @@ type FSharpQuotationsTests() = | NewTuple [ Value(:? int as i, _) ; Value(:? string as s, _) ] when i = 1 && s = "" -> () | _ -> Assert.Fail() + [] + member x.``NewStructTuple without assembly should be recognized by NewStructTuple active pattern`` () = + let expr = Expr.NewStructTuple([ <@@ 1 @@>; <@@ "" @@> ]) + match expr with + | NewStructTuple [ Value(:? int as i, _) ; Value(:? string as s, _) ] when i = 1 && s = "" -> () + | _ -> Assert.Fail() + + [] + member x.``NewStructTuple without assembly should be recognized by NewTuple active pattern`` () = + let expr = Expr.NewStructTuple([ <@@ 1 @@>; <@@ "" @@> ]) + match expr with + | NewTuple [ Value(:? int as i, _) ; Value(:? string as s, _) ] when i = 1 && s = "" -> () + | _ -> Assert.Fail() + [] member x.``NewTuple should not be recognized by NewStructTuple active pattern`` () = let expr = Expr.NewTuple [ <@@ 1 @@>; <@@ "" @@> ] diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs index ff1223b482a..987b779df17 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs @@ -1164,6 +1164,24 @@ type FSharpTypeTests() = // null CheckThrowsArgumentException(fun () ->FSharpType.MakeStructTupleType(asm, [|null;null|]) |> ignore ) + [] + member _.MakeStructTupleTypeNoAsm() = + // positive + Assert.AreEqual(FSharpType.MakeStructTupleType( [|typeof; typeof|]), typeof) + // positive for nested tuple + Assert.AreEqual(FSharpType.MakeStructTupleType( [|for i in 1..10 -> typeof|]), typeof) + // the representations above and below are equivalent, as tuple types are nested from 8th element on + Assert.AreEqual(FSharpType.MakeStructTupleType( [|for i in 1..10 -> typeof|]), typeof>>) + + + // negative + Assert.AreNotEqual(FSharpType.MakeStructTupleType( [|typeof; typeof|]), typeof) + + // invalid cases + CheckThrowsArgumentException(fun () ->FSharpType.MakeStructTupleType( [|null;null|]) |> ignore ) + CheckThrowsArgumentException(fun () ->FSharpType.MakeStructTupleType( null) |> ignore ) + CheckThrowsArgumentException(fun () ->FSharpType.MakeStructTupleType( [| |]) |> ignore ) + type UnionCaseInfoTests() = let singlenullarycaseunion = SingleNullaryCaseDiscUnion.SingleNullaryCaseTag diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs index fd0fe854332..80a20adee00 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -2358,6 +2358,7 @@ Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr N Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewObject(System.Reflection.ConstructorInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewRecord(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(System.Reflection.Assembly, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) +Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewUnionCase(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr PropertyGet(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.PropertyInfo, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]) @@ -2474,6 +2475,7 @@ Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetReco Microsoft.FSharp.Reflection.FSharpType: System.Tuple`2[System.Type,System.Type] GetFunctionElements(System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeFunctionType(System.Type, System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Reflection.Assembly, System.Type[]) +Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Reflection.Assembly, System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type[] GetTupleElements(System.Type) From 9d1563785fae6f062285145ed21f80bf2c0f1a79 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 22 Dec 2022 10:56:22 +0100 Subject: [PATCH 03/15] Ignoring obsolete warning for our published API --- src/FSharp.Core/quotations.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FSharp.Core/quotations.fs b/src/FSharp.Core/quotations.fs index e67639da399..2321f1e7786 100644 --- a/src/FSharp.Core/quotations.fs +++ b/src/FSharp.Core/quotations.fs @@ -19,7 +19,7 @@ open Microsoft.FSharp.Text.StructuredPrintfImpl.Layout open Microsoft.FSharp.Text.StructuredPrintfImpl.TaggedText #nowarn "52" // The value has been copied to ensure the original is not mutated by this operation - +#nowarn "44" // Deprecated construct - uses obsolete reflect functionality to provide an obsolete quotations API //-------------------------------------------------------------------------- // RAW quotations - basic data types //-------------------------------------------------------------------------- From 6df9ac88b4ff1409266b9cb442484616f2c5d0cd Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 22 Dec 2022 11:45:25 +0100 Subject: [PATCH 04/15] Tests should not fail when testing obsolete api --- .../FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs | 2 ++ .../FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs index a8ea2816a73..ccc95482128 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs @@ -4,6 +4,8 @@ namespace FSharp.Core.UnitTests.Quotations +#nowarn "44" // Deprecated construct - tests also cover obsolete API + open System open FSharp.Core.UnitTests.LibraryTestFx open Xunit diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs index 987b779df17..5a2a3b58466 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs @@ -4,6 +4,8 @@ namespace FSharp.Core.UnitTests.Reflection +#nowarn "44" // Deprecated construct - tests also cover obsolete API + open System open System.Reflection From e71cb87d16ae30d8f1d7a9e9e9ab289f7d659585 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 22 Dec 2022 12:46:11 +0100 Subject: [PATCH 05/15] Apply suggestions from code review Co-authored-by: Vlad Zarytovskii --- src/FSharp.Core/reflect.fsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FSharp.Core/reflect.fsi b/src/FSharp.Core/reflect.fsi index e5fa8b56579..7099fe7699a 100644 --- a/src/FSharp.Core/reflect.fsi +++ b/src/FSharp.Core/reflect.fsi @@ -607,7 +607,7 @@ type FSharpType = /// The type representing the tuple containing the input elements. /// /// - [] + [] static member MakeTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types @@ -618,7 +618,7 @@ type FSharpType = /// The type representing the struct tuple containing the input elements. /// /// - [] + [] static member MakeStructTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types From b6052ed07052e40fbccd9a1a2fb22c76a89244e0 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 22 Dec 2022 13:16:37 +0100 Subject: [PATCH 06/15] Update src/FSharp.Core/quotations.fsi Co-authored-by: Vlad Zarytovskii --- src/FSharp.Core/quotations.fsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FSharp.Core/quotations.fsi b/src/FSharp.Core/quotations.fsi index ba6f5a69c5d..3588ed1fa20 100644 --- a/src/FSharp.Core/quotations.fsi +++ b/src/FSharp.Core/quotations.fsi @@ -671,7 +671,7 @@ type Expr = /// /// Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. /// - [] + [] static member NewStructTuple: asm: Assembly * elements: Expr list -> Expr /// Builds an expression that represents the creation of an F# tuple value From e911653a6a498e9287fc7d8053413001e1aea501 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 22 Dec 2022 14:54:03 +0100 Subject: [PATCH 07/15] Updating expected length --- tests/projects/SelfContained_Trimming_Test/check.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/projects/SelfContained_Trimming_Test/check.ps1 b/tests/projects/SelfContained_Trimming_Test/check.ps1 index fbc122b4158..abdd0b8f1ae 100644 --- a/tests/projects/SelfContained_Trimming_Test/check.ps1 +++ b/tests/projects/SelfContained_Trimming_Test/check.ps1 @@ -14,7 +14,7 @@ if (-not ($output -eq $expected)) } # Checking that FSharp.Core binary is of expected size (needs adjustments if test is updated). -$expected_len = 245248 # In bytes +$expected_len = 247296 # In bytes $file = Get-Item .\bin\Release\net7.0\win-x64\publish\FSharp.Core.dll $file_len = $file.Length if (-not ($file_len -eq $expected_len)) From dabbc51f67d3411e14dfa53a1a08f4086561a585 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 22 Dec 2022 17:53:11 +0100 Subject: [PATCH 08/15] Apply suggestions from code review --- src/FSharp.Core/quotations.fsi | 2 +- src/FSharp.Core/reflect.fsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FSharp.Core/quotations.fsi b/src/FSharp.Core/quotations.fsi index 3588ed1fa20..e73e118fff7 100644 --- a/src/FSharp.Core/quotations.fsi +++ b/src/FSharp.Core/quotations.fsi @@ -671,7 +671,7 @@ type Expr = /// /// Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. /// - [] + [] static member NewStructTuple: asm: Assembly * elements: Expr list -> Expr /// Builds an expression that represents the creation of an F# tuple value diff --git a/src/FSharp.Core/reflect.fsi b/src/FSharp.Core/reflect.fsi index 7099fe7699a..ffcb92beb99 100644 --- a/src/FSharp.Core/reflect.fsi +++ b/src/FSharp.Core/reflect.fsi @@ -607,7 +607,7 @@ type FSharpType = /// The type representing the tuple containing the input elements. /// /// - [] + [] static member MakeTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types @@ -618,7 +618,7 @@ type FSharpType = /// The type representing the struct tuple containing the input elements. /// /// - [] + [] static member MakeStructTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types From fb275e56241aa165575f88a4f5a6731b2c68d726 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 5 Jan 2023 10:55:25 +0100 Subject: [PATCH 09/15] Revert making overloads with asm obsolete, keep them as they were --- src/FSharp.Core/quotations.fs | 2 -- src/FSharp.Core/quotations.fsi | 1 - src/FSharp.Core/reflect.fs | 2 -- src/FSharp.Core/reflect.fsi | 2 -- .../FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs | 2 -- .../FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs | 2 -- 6 files changed, 11 deletions(-) diff --git a/src/FSharp.Core/quotations.fs b/src/FSharp.Core/quotations.fs index 2321f1e7786..9958e944a84 100644 --- a/src/FSharp.Core/quotations.fs +++ b/src/FSharp.Core/quotations.fs @@ -19,7 +19,6 @@ open Microsoft.FSharp.Text.StructuredPrintfImpl.Layout open Microsoft.FSharp.Text.StructuredPrintfImpl.TaggedText #nowarn "52" // The value has been copied to ensure the original is not mutated by this operation -#nowarn "44" // Deprecated construct - uses obsolete reflect functionality to provide an obsolete quotations API //-------------------------------------------------------------------------- // RAW quotations - basic data types //-------------------------------------------------------------------------- @@ -2666,7 +2665,6 @@ type Expr with static member NewTuple elements = mkNewTuple elements - // Obsolete in .fsi static member NewStructTuple(asm: Assembly, elements) = mkNewStructTuple (asm, elements) diff --git a/src/FSharp.Core/quotations.fsi b/src/FSharp.Core/quotations.fsi index e73e118fff7..7b689671c18 100644 --- a/src/FSharp.Core/quotations.fsi +++ b/src/FSharp.Core/quotations.fsi @@ -671,7 +671,6 @@ type Expr = /// /// Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. /// - [] static member NewStructTuple: asm: Assembly * elements: Expr list -> Expr /// Builds an expression that represents the creation of an F# tuple value diff --git a/src/FSharp.Core/reflect.fs b/src/FSharp.Core/reflect.fs index 473dc3b3c87..d4c13b626eb 100644 --- a/src/FSharp.Core/reflect.fs +++ b/src/FSharp.Core/reflect.fs @@ -1224,7 +1224,6 @@ type FSharpType = mkTupleTypeNetStandard refTupleTypesNetStandard types - // Obsolete in .fsi static member MakeTupleType(asm: Assembly, types: Type[]) = checkNonNull "types" types @@ -1238,7 +1237,6 @@ type FSharpType = ObsoleteTupleTypeMaking.mkTupleType false asm types - // Obsolete in .fsi static member MakeStructTupleType(asm: Assembly, types: Type[]) = checkNonNull "types" types diff --git a/src/FSharp.Core/reflect.fsi b/src/FSharp.Core/reflect.fsi index ffcb92beb99..6f528195ae5 100644 --- a/src/FSharp.Core/reflect.fsi +++ b/src/FSharp.Core/reflect.fsi @@ -607,7 +607,6 @@ type FSharpType = /// The type representing the tuple containing the input elements. /// /// - [] static member MakeTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types @@ -618,7 +617,6 @@ type FSharpType = /// The type representing the struct tuple containing the input elements. /// /// - [] static member MakeStructTupleType: asm: Assembly * types: Type[] -> Type /// Returns a representing an F# struct tuple type with the given element types diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs index ccc95482128..a8ea2816a73 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs @@ -4,8 +4,6 @@ namespace FSharp.Core.UnitTests.Quotations -#nowarn "44" // Deprecated construct - tests also cover obsolete API - open System open FSharp.Core.UnitTests.LibraryTestFx open Xunit diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs index 5a2a3b58466..987b779df17 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs @@ -4,8 +4,6 @@ namespace FSharp.Core.UnitTests.Reflection -#nowarn "44" // Deprecated construct - tests also cover obsolete API - open System open System.Reflection From 0a9d463aea459e1f221795856be37d27133feefa Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 5 Jan 2023 16:01:53 +0100 Subject: [PATCH 10/15] Update expected size of fsharp.core --- tests/projects/SelfContained_Trimming_Test/check.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/projects/SelfContained_Trimming_Test/check.ps1 b/tests/projects/SelfContained_Trimming_Test/check.ps1 index 388ed50ae7e..5269bd2b6f4 100644 --- a/tests/projects/SelfContained_Trimming_Test/check.ps1 +++ b/tests/projects/SelfContained_Trimming_Test/check.ps1 @@ -14,7 +14,7 @@ if (-not ($output -eq $expected)) } # Checking that FSharp.Core binary is of expected size (needs adjustments if test is updated). -$expected_len = 246272 # In bytes +$expected_len = 248320 # In bytes $file = Get-Item .\bin\Release\net7.0\win-x64\publish\FSharp.Core.dll $file_len = $file.Length if (-not ($file_len -eq $expected_len)) From 74ddb438e0234554670f1b42c821a205b06fd4d8 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 9 Jan 2023 20:02:21 +0100 Subject: [PATCH 11/15] Let Linq use the old overload for users on net46 or older --- src/FSharp.Core/Linq.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FSharp.Core/Linq.fs b/src/FSharp.Core/Linq.fs index 0e58b7911cb..6b62eccb93e 100644 --- a/src/FSharp.Core/Linq.fs +++ b/src/FSharp.Core/Linq.fs @@ -740,7 +740,7 @@ module LeafExpressionConverter = let tupTy = let argTypes = args |> List.map (fun arg -> arg.Type) |> Array.ofList if inp.Type.IsValueType then - Reflection.FSharpType.MakeStructTupleType(argTypes) + Reflection.FSharpType.MakeStructTupleType(inp.Type.Assembly, argTypes) else Reflection.FSharpType.MakeTupleType(argTypes) let argsP = ConvExprsToLinq env args From 1ab0d190d4c40636ee6f824ae3cab455d1770597 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 9 Jan 2023 20:11:49 +0100 Subject: [PATCH 12/15] Calling the internal module TupleFromSpecifiedAssembly instead of Obsolete --- src/FSharp.Core/reflect.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FSharp.Core/reflect.fs b/src/FSharp.Core/reflect.fs index d4c13b626eb..420a676f759 100644 --- a/src/FSharp.Core/reflect.fs +++ b/src/FSharp.Core/reflect.fs @@ -664,7 +664,7 @@ module internal Impl = // Which field holds the nested tuple? let tupleEncField = maxTuple - 1 - module internal ObsoleteTupleTypeMaking = + module internal TupleFromSpecifiedAssembly = let private tupleNames = [| "System.Tuple`1" @@ -1235,7 +1235,7 @@ type FSharpType = then invalidArg "types" (SR.GetString(SR.nullsNotAllowedInArray)) - ObsoleteTupleTypeMaking.mkTupleType false asm types + TupleFromSpecifiedAssembly.mkTupleType false asm types static member MakeStructTupleType(asm: Assembly, types: Type[]) = checkNonNull "types" types @@ -1248,7 +1248,7 @@ type FSharpType = then invalidArg "types" (SR.GetString(SR.nullsNotAllowedInArray)) - ObsoleteTupleTypeMaking.mkTupleType true asm types + TupleFromSpecifiedAssembly.mkTupleType true asm types static member MakeStructTupleType(types: Type[]) = checkNonNull "types" types From d8ef785d22d0fb9a658da8b38c578e69603a37d4 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 9 Jan 2023 20:45:34 +0100 Subject: [PATCH 13/15] Updating expected len of trimmed app --- tests/projects/SelfContained_Trimming_Test/check.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/projects/SelfContained_Trimming_Test/check.ps1 b/tests/projects/SelfContained_Trimming_Test/check.ps1 index 5269bd2b6f4..0be2860d3ce 100644 --- a/tests/projects/SelfContained_Trimming_Test/check.ps1 +++ b/tests/projects/SelfContained_Trimming_Test/check.ps1 @@ -14,7 +14,7 @@ if (-not ($output -eq $expected)) } # Checking that FSharp.Core binary is of expected size (needs adjustments if test is updated). -$expected_len = 248320 # In bytes +$expected_len = 248832 # In bytes $file = Get-Item .\bin\Release\net7.0\win-x64\publish\FSharp.Core.dll $file_len = $file.Length if (-not ($file_len -eq $expected_len)) From 46d3efd5db0c8b8b428677ec352ede799c91a980 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 30 Jan 2023 11:44:06 +0100 Subject: [PATCH 14/15] trimming check - size updated --- tests/projects/SelfContained_Trimming_Test/check.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/projects/SelfContained_Trimming_Test/check.ps1 b/tests/projects/SelfContained_Trimming_Test/check.ps1 index 0be2860d3ce..5269bd2b6f4 100644 --- a/tests/projects/SelfContained_Trimming_Test/check.ps1 +++ b/tests/projects/SelfContained_Trimming_Test/check.ps1 @@ -14,7 +14,7 @@ if (-not ($output -eq $expected)) } # Checking that FSharp.Core binary is of expected size (needs adjustments if test is updated). -$expected_len = 248832 # In bytes +$expected_len = 248320 # In bytes $file = Get-Item .\bin\Release\net7.0\win-x64\publish\FSharp.Core.dll $file_len = $file.Length if (-not ($file_len -eq $expected_len)) From 878b91d3ee60a0de8897ca27a0e6c475da7f4310 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 30 Jan 2023 12:43:36 +0100 Subject: [PATCH 15/15] Changing Fsharp.Core baseline --- .../FSharp.Core.SurfaceArea.netstandard20.debug.bsl | 2 ++ .../FSharp.Core.SurfaceArea.netstandard20.release.bsl | 2 ++ .../FSharp.Core.SurfaceArea.netstandard21.debug.bsl | 2 ++ .../FSharp.Core.SurfaceArea.netstandard21.release.bsl | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl index b0ec5cbb925..7d0927147c0 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl @@ -2350,6 +2350,7 @@ Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr N Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewDelegate(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar], Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewObject(System.Reflection.ConstructorInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewRecord(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) +Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(System.Reflection.Assembly, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewUnionCase(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) @@ -2467,6 +2468,7 @@ Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetReco Microsoft.FSharp.Reflection.FSharpType: System.Tuple`2[System.Type,System.Type] GetFunctionElements(System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeFunctionType(System.Type, System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Reflection.Assembly, System.Type[]) +Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Reflection.Assembly, System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type[] GetTupleElements(System.Type) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl index bb1dd5db9d6..36b4f758dff 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl @@ -2349,6 +2349,7 @@ Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr N Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewDelegate(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar], Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewObject(System.Reflection.ConstructorInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewRecord(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) +Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(System.Reflection.Assembly, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewUnionCase(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) @@ -2466,6 +2467,7 @@ Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetReco Microsoft.FSharp.Reflection.FSharpType: System.Tuple`2[System.Type,System.Type] GetFunctionElements(System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeFunctionType(System.Type, System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Reflection.Assembly, System.Type[]) +Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Reflection.Assembly, System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type[] GetTupleElements(System.Type) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl index 028a4fee29b..fecb8627b97 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl @@ -2351,6 +2351,7 @@ Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr N Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewDelegate(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar], Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewObject(System.Reflection.ConstructorInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewRecord(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) +Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(System.Reflection.Assembly, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewUnionCase(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) @@ -2468,6 +2469,7 @@ Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetReco Microsoft.FSharp.Reflection.FSharpType: System.Tuple`2[System.Type,System.Type] GetFunctionElements(System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeFunctionType(System.Type, System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Reflection.Assembly, System.Type[]) +Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Reflection.Assembly, System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type[] GetTupleElements(System.Type) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl index 029951a590b..cd9e92fa8c6 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl @@ -2350,6 +2350,7 @@ Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr N Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewDelegate(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar], Microsoft.FSharp.Quotations.FSharpExpr) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewObject(System.Reflection.ConstructorInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewRecord(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) +Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(System.Reflection.Assembly, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewUnionCase(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) @@ -2467,6 +2468,7 @@ Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetReco Microsoft.FSharp.Reflection.FSharpType: System.Tuple`2[System.Type,System.Type] GetFunctionElements(System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeFunctionType(System.Type, System.Type) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Reflection.Assembly, System.Type[]) +Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Reflection.Assembly, System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Type[]) Microsoft.FSharp.Reflection.FSharpType: System.Type[] GetTupleElements(System.Type)