diff --git a/src/Compiler/Driver/CompilerConfig.fs b/src/Compiler/Driver/CompilerConfig.fs index 53feaab3a6..8d9ea5bd21 100644 --- a/src/Compiler/Driver/CompilerConfig.fs +++ b/src/Compiler/Driver/CompilerConfig.fs @@ -5,6 +5,7 @@ module internal FSharp.Compiler.CompilerConfig open System open System.Collections.Concurrent +open System.Runtime.InteropServices open System.IO open Internal.Utilities open Internal.Utilities.FSharpEnvironment @@ -1137,27 +1138,20 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = yield clrFacades | None -> - // "there is no really good notion of runtime directory on .NETCore" -#if NETSTANDARD - let runtimeRoot = Path.GetDirectoryName(typeof.Assembly.Location) -#else - let runtimeRoot = - System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() -#endif - let runtimeRootWithoutSlash = runtimeRoot.TrimEnd('/', '\\') - let runtimeRootFacades = Path.Combine(runtimeRootWithoutSlash, "Facades") - let runtimeRootWPF = Path.Combine(runtimeRootWithoutSlash, "WPF") - match data.resolutionEnvironment with | LegacyResolutionEnvironment.CompilationAndEvaluation -> // Default compilation-and-execution-time references on .NET Framework and Mono, e.g. for F# Interactive - // // In the current way of doing things, F# Interactive refers to implementation assemblies. + let runtimeRoot = RuntimeEnvironment.GetRuntimeDirectory().TrimEnd('/', '\\') yield runtimeRoot + let runtimeRootFacades = Path.Combine(runtimeRoot, "Facades") + if FileSystem.DirectoryExistsShim runtimeRootFacades then yield runtimeRootFacades // System.Runtime.dll is in /usr/lib/mono/4.5/Facades + let runtimeRootWPF = Path.Combine(runtimeRoot, "WPF") + if FileSystem.DirectoryExistsShim runtimeRootWPF then yield runtimeRootWPF // PresentationCore.dll is in C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index 64d9c13128..30a55989ed 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -3379,22 +3379,19 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i do tcConfigB.useFsiAuxLib <- fsi.UseFsiAuxLib do tcConfigB.conditionalDefines <- "INTERACTIVE" :: tcConfigB.conditionalDefines -#if NETSTANDARD + do tcConfigB.SetUseSdkRefs true do tcConfigB.useSimpleResolution <- true do if isRunningOnCoreClr then SetTargetProfile tcConfigB "netcore" // always assume System.Runtime codegen -#endif // Preset: --optimize+ -g --tailcalls+ (see 4505) do SetOptimizeSwitch tcConfigB OptionSwitch.On do SetDebugSwitch tcConfigB (Some "pdbonly") OptionSwitch.On do SetTailcallSwitch tcConfigB OptionSwitch.On -#if NETSTANDARD // set platform depending on whether the current process is a 64-bit process. // BUG 429882 : FsiAnyCPU.exe issues warnings (x64 v MSIL) when referencing 64-bit assemblies do tcConfigB.platform <- if IntPtr.Size = 8 then Some AMD64 else Some X86 -#endif let fsiStdinSyphon = FsiStdinSyphon(errorWriter) let fsiConsoleOutput = FsiConsoleOutput(tcConfigB, outWriter, errorWriter) diff --git a/src/Compiler/Utilities/sformat.fs b/src/Compiler/Utilities/sformat.fs index 303e2f968b..d3c1edc8ba 100644 --- a/src/Compiler/Utilities/sformat.fs +++ b/src/Compiler/Utilities/sformat.fs @@ -1423,22 +1423,13 @@ module Display = // massively reign in deep printing of properties let nDepth = depthLim / 10 -#if NETSTANDARD + Array.Sort( propsAndFields, { new IComparer with member this.Compare(p1, p2) = compare p1.Name p2.Name } ) -#else - Array.Sort( - (propsAndFields :> Array), - { new System.Collections.IComparer with - member this.Compare(p1, p2) = - compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) - } - ) -#endif if propsAndFields.Length = 0 || (nDepth <= 0) then basicL diff --git a/src/FSharp.Core/array2.fs b/src/FSharp.Core/array2.fs index 1820a66cee..0b04b0b1ca 100644 --- a/src/FSharp.Core/array2.fs +++ b/src/FSharp.Core/array2.fs @@ -52,12 +52,7 @@ module Array2D = [] let zeroCreateBased (base1:int) (base2:int) (length1:int) (length2:int) = if base1 = 0 && base2 = 0 then -#if NETSTANDARD - zeroCreate length1 length2 -#else - // Note: this overload is available on Compact Framework and Silverlight, but not Portable - (System.Array.CreateInstance(typeof<'T>, [|length1;length2|]) :?> 'T[,]) -#endif + zeroCreate length1 length2 else (Array.CreateInstance(typeof<'T>, [|length1;length2|], [|base1;base2|]) :?> 'T[,]) diff --git a/src/FSharp.Core/reflect.fs b/src/FSharp.Core/reflect.fs index e9522f68c9..6e0977e6ed 100644 --- a/src/FSharp.Core/reflect.fs +++ b/src/FSharp.Core/reflect.fs @@ -758,70 +758,12 @@ module internal Impl = tyargs let orderTupleProperties (props: PropertyInfo[]) = - // The tuple properties are of the form: - // Item1 - // .. - // Item1, Item2, ..., Item - // Item1, Item2, ..., Item, Rest - // The PropertyInfo may not come back in order, so ensure ordering here. -#if !NETSTANDARD - assert (maxTuple < 10) // Alphasort will only works for upto 9 items: Item1, Item10, Item2, Item3, ..., Item9, Rest -#endif - let props = props |> Array.sortBy (fun p -> p.Name) // they are not always in alphabetic order -#if !NETSTANDARD - assert (props.Length <= maxTuple) - - assert - (let haveNames = props |> Array.map (fun p -> p.Name) - - let expectNames = - Array.init props.Length (fun i -> - let j = i + 1 // index j = 1, 2, .., props.Length <= maxTuple - - if j < maxTuple then - "Item" + string j - elif j = maxTuple then - "Rest" - else - (assert false - "")) // dead code under prior assert, props.Length <= maxTuple - - haveNames = expectNames) -#endif - props + // The PropertyInfo[] may not come back in order, so ensure ordering here. + props |> Array.sortBy (fun p -> p.Name) // alphabetic works because there is max. 8 of them let orderTupleFields (fields: FieldInfo[]) = - // The tuple fields are of the form: - // Item1 - // .. - // Item1, Item2, ..., Item - // Item1, Item2, ..., Item, Rest - // The PropertyInfo may not come back in order, so ensure ordering here. -#if !NETSTANDARD - assert (maxTuple < 10) // Alphasort will only works for upto 9 items: Item1, Item10, Item2, Item3, ..., Item9, Rest -#endif - let fields = fields |> Array.sortBy (fun fi -> fi.Name) // they are not always in alphabetic order -#if !NETSTANDARD - assert (fields.Length <= maxTuple) - - assert - (let haveNames = fields |> Array.map (fun fi -> fi.Name) - - let expectNames = - Array.init fields.Length (fun i -> - let j = i + 1 // index j = 1, 2, .., fields.Length <= maxTuple - - if j < maxTuple then - "Item" + string j - elif j = maxTuple then - "Rest" - else - (assert false - "")) // dead code under prior assert, props.Length <= maxTuple - - haveNames = expectNames) -#endif - fields + // The FieldInfo[] may not come back in order, so ensure ordering here. + fields |> Array.sortBy (fun fi -> fi.Name) // alphabetic works because there is max. 8 of them let getTupleConstructorMethod (typ: Type) = let ctor = diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index 44f84521e3..2f55c8c7c3 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/TypesAndTypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -374,11 +374,7 @@ module Negative = |> ignore - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``IWSAM warning`` () = Fsx "let fExpectAWarning(x: Types.ISinOperator<'T>) = ()" |> withReferences [typesModule] @@ -415,11 +411,7 @@ module InvocationBehavior = |> shouldFail |> withErrorMessage "This function takes too many arguments, or is used in a context where a function is not expected" - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``IWSAM Delegate conversion works`` () = Fsx """ @@ -436,11 +428,7 @@ module InvocationBehavior = |> compileAndRun |> shouldSucceed - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``IWSAM Expression conversion works`` () = Fsx """ @@ -597,11 +585,7 @@ module ``Implicit conversion`` = |> withLangVersion70 |> withOptions ["--nowarn:3535"] - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``Function implicit conversion not supported on constrained type`` () = Fsx """ @@ -615,11 +599,7 @@ module ``Implicit conversion`` = |> shouldFail |> withDiagnosticMessageMatches "This expression was expected to have type\\s+'int'\\s+but here has type\\s+''T'" - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``Method implicit conversion not supported on constrained type`` () = Fsx """ @@ -633,11 +613,7 @@ module ``Implicit conversion`` = |> shouldFail |> withDiagnosticMessageMatches "This expression was expected to have type\\s+'int'\\s+but here has type\\s+''T'" - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``Function explicit conversion works on constrained type`` () = Fsx """ @@ -650,11 +626,7 @@ module ``Implicit conversion`` = |> compile |> shouldSucceed - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``Method explicit conversion works on constrained type`` () = Fsx """ @@ -752,11 +724,7 @@ module ``Active patterns`` = |> withName "Potato" |> withOptions ["--nowarn:3535"] - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``Using IWSAM in active pattern`` () = FSharp """ module Potato.Test @@ -786,11 +754,7 @@ module ``Active patterns`` = """ ] - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``Using IWSAM equality in active pattern uses generic equality intrinsic`` () = FSharp """ module Potato.Test @@ -828,11 +792,7 @@ module ``Active patterns`` = module ``Suppression of System Numerics interfaces on unitized types`` = -#if !NETCOREAPP - [] -#else - [] -#endif + [] let Baseline () = Fsx """ open System.Numerics diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SkipLocalsInit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SkipLocalsInit.fs index 8b69fa7328..65ba4655cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SkipLocalsInit.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SkipLocalsInit.fs @@ -5,9 +5,8 @@ namespace FSharp.Compiler.ComponentTests.EmittedIL open Xunit open FSharp.Test.Compiler -#if NETCOREAPP module ``SkipLocalsInit`` = - [] + [] let ``Init in function and closure not emitted when applied on function``() = FSharp """ module SkipLocalsInit @@ -35,7 +34,7 @@ let x () = .maxstack 6 .locals (int32 V_0)"""] - [] + [] let ``Init in static method not emitted when applied on class``() = FSharp """ module SkipLocalsInit @@ -60,7 +59,7 @@ type X () = .maxstack 4 .locals (int32 V_0)"""] - [] + [] let ``Init in static method and function not emitted when applied on module``() = FSharp """ [] @@ -97,7 +96,7 @@ type X () = .maxstack 4 .locals (int32 V_0)"""] - [] + [] let ``Init in method and closure not emitted when applied on method``() = FSharp """ module SkipLocalsInit @@ -131,7 +130,7 @@ type X () = .locals (int32 V_0) """ ] - [] + [] let ``Zero init performed to get defaults despite the attribute``() = FSharp """ module SkipLocalsInit @@ -180,5 +179,4 @@ IL_0019: ldarg.0 IL_001a: ldloc.0 IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!a>::Invoke(!0) IL_0020: stloc.2 -IL_0021: ret"""] -#endif \ No newline at end of file +IL_0021: ret"""] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnsupportedAttributes.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnsupportedAttributes.fs index 276bad5963..fa981de2a1 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnsupportedAttributes.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnsupportedAttributes.fs @@ -2,13 +2,12 @@ namespace FSharp.Compiler.ComponentTests.ErrorMessages -#if NETCOREAPP open Xunit open FSharp.Test.Compiler module ``Unsupported Attributes`` = - [] + [] let ``Warn successfully`` () = """ open System.Runtime.CompilerServices @@ -51,5 +50,4 @@ type C() = EndColumn = 56 } Message = "This attribute is currently unsupported by the F# compiler. Applying it will not achieve its intended effect." } - ] -#endif \ No newline at end of file + ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs b/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs index 0b2d4cc37a..66393325eb 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs @@ -42,11 +42,7 @@ module ``Required and init-only properties`` = }""" |> withCSharpLanguageVersion CSharpLanguageVersion.Preview |> withName "csLib" -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can init both set and init-only`` () = let csharpLib = csharpBaseClass @@ -72,11 +68,7 @@ let main _ = |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can change set property`` () = let csharpLib = csharpBaseClass @@ -107,11 +99,7 @@ let main _ = |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can change set property via calling an explicit setter`` () = let csharpLib = csharpBaseClass @@ -142,11 +130,7 @@ let main _ = |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can get property via calling an explicit getter`` () = let csharpLib = csharpBaseClass @@ -172,11 +156,7 @@ let main _ = |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# cannot change init-only property`` () = let csharpLib = csharpBaseClass @@ -204,11 +184,7 @@ let main _ = Error 810, Line 9, Col 5, Line 9, Col 17, "Init-only property 'GetInit' cannot be set outside the initialization code. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" ] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# cannot change init-only property via calling an explicit setter`` () = let csharpLib = csharpBaseClass @@ -236,11 +212,7 @@ let main _ = Error 810, Line 9, Col 5, Line 9, Col 21, "Cannot call 'set_GetInit' - a setter for init-only property, please use object initialization instead. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" ] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# cannot change init-only property via calling an initializer on instance`` () = let csharpLib = csharpBaseClass @@ -267,11 +239,7 @@ let main _ = Error 810, Line 9, Col 38, Line 9, Col 40, "Init-only property 'GetInit' cannot be set outside the initialization code. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization" ] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can change init-only property via SRTP`` () = let csharpLib = csharpBaseClass @@ -296,11 +264,7 @@ let main _ = |> compile |> shouldSucceed - #if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can call special-named methods via SRTP`` () = let csharpLib = csharpRecord @@ -325,11 +289,7 @@ let main _ = |> compile |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# should produce compile-time error when required properties are not specified in the initializer`` () = let csharpLib = csharpRBaseClass @@ -356,11 +316,7 @@ let main _ = Error 3545, Line 8, Col 16, Line 8, Col 22, "The following required properties have to be initalized:" + Environment.NewLine + " property RAIO.GetSet: int with get, set" + Environment.NewLine + " property RAIO.GetInit: int with get, set" ] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# should produce compile-time error when some required properties are not specified in the initializer`` () = let csharpLib = csharpRBaseClass @@ -387,11 +343,7 @@ let main _ = Error 3545, Line 8, Col 16, Line 8, Col 30, "The following required properties have to be initalized:" + Environment.NewLine + " property RAIO.GetInit: int with get, set" ] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# should not produce compile-time error when all required properties are specified in the initializer`` () = let csharpLib = csharpRBaseClass @@ -420,11 +372,7 @@ let main _ = |> compileAndRun |> shouldSucceed - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``F# should only be able to explicitly call constructors which set SetsRequiredMembersAttribute`` () = let csharpLib = @@ -481,11 +429,7 @@ let main _ = |> shouldFail |> withSingleDiagnostic (Error 3545, Line 7, Col 21, Line 7, Col 30, "The following required properties have to be initalized:" + Environment.NewLine + " property RAIO.GetSet: int with get, set" + Environment.NewLine + " property RAIO.GetInit: int with get, set") -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# should produce a warning if RequiredMemberAttribute is specified`` () = let fsharpSource = """ diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs b/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs index 3d6afab3f3..c4cd83d5fd 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs @@ -63,11 +63,7 @@ module ``Static Methods In Interfaces`` = } """ |> withCSharpLanguageVersion CSharpLanguageVersion.Preview |> withName "csOpLib" - #if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can use operators declared in C#`` () = let fsharpSource = @@ -111,11 +107,7 @@ let main _ = |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can call static methods declared in interfaces from C#`` () = let csharpLib = csharpBaseClass @@ -170,11 +162,7 @@ let main _ = ... } *) - #if !NETCOREAPP - [] - #else - [] - #endif + [] let ``F# generates valid IL for abstract static interface methods`` () = let csharpLib = csharpBaseClass @@ -268,11 +256,7 @@ Next(class StaticsTesting/MyRepeatSequence2 other) cil managed } """] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can implement static methods declared in interfaces from C#`` () = let csharpLib = csharpBaseClass @@ -317,11 +301,7 @@ let main _ = |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can implement interfaces with static abstract methods`` () = let fsharpSource = @@ -343,11 +323,7 @@ let main _ = 0 |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# supports inference for types of arguments when implementing interfaces`` () = let fsharpSource = @@ -369,11 +345,7 @@ let main _ = 0 |> compileAndRun |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``F# can call interface with static abstract method`` () = FSharp """ @@ -639,11 +611,7 @@ module Test = #endif ] -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``C# can call constrained method defined in F#`` () = let FSharpLib = FSharp """ diff --git a/tests/FSharp.Compiler.ComponentTests/Language/AttributeCheckingTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/AttributeCheckingTests.fs index a5db85f88d..3ab5266f31 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/AttributeCheckingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/AttributeCheckingTests.fs @@ -43,11 +43,7 @@ type C() = |> compile |> shouldSucceed -#if !NETCOREAPP - [] -#else - [] -#endif + [] let ``Regression: typechecker does not fail when attribute is on type variable (https://github.com/dotnet/fsharp/issues/13525)`` () = let csharpBaseClass = CSharp """ diff --git a/tests/FSharp.Compiler.ComponentTests/Language/IndexerSetterParamArray.fs b/tests/FSharp.Compiler.ComponentTests/Language/IndexerSetterParamArray.fs index 4db7e7be9b..471e8c9c3a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/IndexerSetterParamArray.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/IndexerSetterParamArray.fs @@ -5,11 +5,10 @@ namespace FSharp.Compiler.ComponentTests open Xunit open FSharp.Test.Compiler -#if NETCOREAPP // Test cases for https://github.com/dotnet/fsharp/issues/9369 module IndexerSetterParamArray = - [] + [] let ``Indexer setter can use ParamArray`` () = FSharp """ module One @@ -59,7 +58,7 @@ if v5 <> "set([|2|], 7); get([|2|])" then failwith "not right value" // In this case the indexers take one initial arg then a ParamArray - [] + [] let ``Indexer setter can use ParamArray with one initial arg`` () = FSharp """ module One @@ -118,7 +117,7 @@ if v5 <> "set(1, [|2|], 7); get(1, [|2|])" then failwith "not right value" |> compileExeAndRun |> shouldSucceed - [] + [] let ``Indexer setter via extension can use ParamArray`` () = FSharp """ module One @@ -169,6 +168,4 @@ if v5 <> "set([|2|], 7); get([|2|])" then failwith "not right value" """ |> ignoreWarnings |> compileExeAndRun - |> shouldSucceed - -#endif \ No newline at end of file + |> shouldSucceed \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs b/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs index 8b69fa7328..65ba4655cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs +++ b/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs @@ -5,9 +5,8 @@ namespace FSharp.Compiler.ComponentTests.EmittedIL open Xunit open FSharp.Test.Compiler -#if NETCOREAPP module ``SkipLocalsInit`` = - [] + [] let ``Init in function and closure not emitted when applied on function``() = FSharp """ module SkipLocalsInit @@ -35,7 +34,7 @@ let x () = .maxstack 6 .locals (int32 V_0)"""] - [] + [] let ``Init in static method not emitted when applied on class``() = FSharp """ module SkipLocalsInit @@ -60,7 +59,7 @@ type X () = .maxstack 4 .locals (int32 V_0)"""] - [] + [] let ``Init in static method and function not emitted when applied on module``() = FSharp """ [] @@ -97,7 +96,7 @@ type X () = .maxstack 4 .locals (int32 V_0)"""] - [] + [] let ``Init in method and closure not emitted when applied on method``() = FSharp """ module SkipLocalsInit @@ -131,7 +130,7 @@ type X () = .locals (int32 V_0) """ ] - [] + [] let ``Zero init performed to get defaults despite the attribute``() = FSharp """ module SkipLocalsInit @@ -180,5 +179,4 @@ IL_0019: ldarg.0 IL_001a: ldloc.0 IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!a>::Invoke(!0) IL_0020: stloc.2 -IL_0021: ret"""] -#endif \ No newline at end of file +IL_0021: ret"""] \ No newline at end of file diff --git a/tests/FSharp.Compiler.UnitTests/AssemblySigningAttributes.fs b/tests/FSharp.Compiler.UnitTests/AssemblySigningAttributes.fs index 82da5f0a14..a5a6eb7dae 100644 --- a/tests/FSharp.Compiler.UnitTests/AssemblySigningAttributes.fs +++ b/tests/FSharp.Compiler.UnitTests/AssemblySigningAttributes.fs @@ -8,9 +8,7 @@ open FSharp.Test.Compiler module AssemblySigning = -#if !NETCOREAPP - [] -#endif + [] let ``--keycontainer:name DESKTOP`` () = FSharp """ module SignMe @@ -26,9 +24,7 @@ open System.Reflection |> withDiagnosticMessageMatches "The command-line option '--keycontainer' has been deprecated. Use '--keyfile' instead." |> ignore -#if NETCOREAPP - [] -#endif + [] let ``--keycontainer:name NETCOREAPP`` () = FSharp """ module SignMe @@ -45,9 +41,7 @@ open System.Reflection |> ignore //Expects: warning FS3392: The 'AssemblyKeyNameAttribute' has been deprecated. Use 'AssemblyKeyFileAttribute' instead. -#if !NETCOREAPP - [] -#endif + [] let ``AssemblyKeyNameAttribute DESKTOP`` () = FSharp """ module SignMe @@ -66,9 +60,7 @@ do () |> ignore //Expects: warning FS3392: The 'AssemblyKeyNameAttribute' has been deprecated. Use 'AssemblyKeyFileAttribute' instead. -#if NETCOREAPP - [] -#endif + [] let ``AssemblyKeyNameAttribute NETCOREAPP`` () = FSharp """ module SignMe diff --git a/tests/FSharp.Compiler.UnitTests/FsiTests.fs b/tests/FSharp.Compiler.UnitTests/FsiTests.fs index 0aed7bbb74..73f3352393 100644 --- a/tests/FSharp.Compiler.UnitTests/FsiTests.fs +++ b/tests/FSharp.Compiler.UnitTests/FsiTests.fs @@ -644,34 +644,12 @@ module FsiTests = Assert.shouldBe typeof boundValue.Value.ReflectionType boundValue.Value.ReflectionValue.Should().Be(mdArr, "") |> ignore -#if NETCOREAPP - [] - let ``Evaluating simple reference and code succeeds with multiemit on``() = - - use fsiSession = createFsiSession false - let assemblyPath = typeof.Assembly.Location.Replace("\\", "/") - let res, errors = fsiSession.EvalInteractionNonThrowing($""" - #r "{assemblyPath}" - FSharp.Compiler.UnitTests.MyModule.test(3)""") - - errors - |> Array.iter (fun e -> printfn "error: %A" e) + [] + [] + [] + let ``Evaluating simple reference and code succeeds``(useOneDynamicAssembly:bool) = - match res with - | Choice1Of2 v -> - let v = - match v with - | Some v -> sprintf "%A" v.ReflectionValue - | None -> "(none)" - printfn "value: %A" v - | Choice2Of2 e -> - printfn "exception: %A" e - raise e - - [] - let ``Evaluating simple reference and code succeeds with multiemit off``() = - - use fsiSession = createFsiSession true + use fsiSession = createFsiSession useOneDynamicAssembly let assemblyPath = typeof.Assembly.Location.Replace("\\", "/") let res, errors = fsiSession.EvalInteractionNonThrowing($""" #r "{assemblyPath}" @@ -689,5 +667,4 @@ module FsiTests = printfn "value: %A" v | Choice2Of2 e -> printfn "exception: %A" e - raise e -#endif + raise e \ No newline at end of file diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj index eaa3a0c416..095094dbd7 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj @@ -91,7 +91,6 @@ - diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs index 817d1fcc47..a0bb9eddb6 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs @@ -1628,114 +1628,114 @@ module ComparersRegression = static member I = inlinable static member N = noninlinable -#if !NETSTANDARD1_6 && !NETCOREAPP - let create<'a,'b when 'b : equality> name operation (f:IOperation<'a>) (items:array<'a>) = - printf """ [] - member _.``%s %s``() = - validate (%s) %s """ name operation name operation - - make_result_set f items None - |> Seq.iteri (fun n result -> - if n = 0 - then printf "[|" - else printf ";" - if n % 40 = 0 then printf "\n " - printf "%d" result) - printfn "\n |]\n" - - let create_inequalities name (items:array<'a>) = - create name "C.I.equals" C.I.equals items - create name "C.I.equal" C.I.equal items - create name "C.I.not_equal" C.I.not_equal items - create name "C.I.compare" C.I.compare items - create name "C.I.less_than" C.I.less_than items - create name "C.I.less_or_equal" C.I.less_or_equal items - create name "C.I.greater_than" C.I.greater_than items - create name "C.I.greater_or_equal" C.I.greater_or_equal items - create name "C.N.equals" C.N.equals items - create name "C.N.equal" C.N.equal items - create name "C.N.not_equal" C.N.not_equal items - create name "C.N.compare" C.N.compare items - create name "C.N.less_than" C.N.less_than items - create name "C.N.less_or_equal" C.N.less_or_equal items - create name "C.N.greater_than" C.N.greater_than items - create name "C.N.greater_or_equal" C.N.greater_or_equal items - - let create_equalities name (items:array<'a>) = - create name "E.I.equals" E.I.equals items - create name "E.I.equal" E.I.equal items - create name "E.I.not_equal" E.I.not_equal items - create name "E.N.equals" E.N.equals items - create name "E.N.equal" E.N.equal items - create name "E.N.not_equal" E.N.not_equal items - - let create_collection_inequalities name (collection:Collection<_,_,_,_>) = - create_inequalities (name + ".Array") collection.Array - create_inequalities (name + ".OptionArray") collection.OptionArray - create_inequalities (name + ".RefArray") collection.RefArray - create_inequalities (name + ".RefWrapArray") collection.RefWrapArray - create_inequalities (name + ".UnionArray") collection.UnionArray - create_inequalities (name + ".UnionWrapArray") collection.UnionWrapArray - create_inequalities (name + ".ValueArray") collection.ValueArray - create_inequalities (name + ".ValueWrapArray") collection.ValueWrapArray - create_inequalities (name + ".ArrayArray") collection.ArrayArray - create_inequalities (name + ".ListArray") collection.ListArray - create_inequalities (name + ".ArrayArray |> Array.map Set.ofArray") (collection.ArrayArray |> Array.map Set.ofArray) - - let create_tuples_tests name (collection:Collection<_,_,_,_>) = - create_inequalities (name + ".Array") collection.Array - - let create_collection_equalities name (collection:Collection<_,_,_,_>) = - create_equalities (name + ".Array") collection.Array - create_equalities (name + ".OptionArray") collection.OptionArray - create_equalities (name + ".RefArray") collection.RefArray - create_equalities (name + ".RefWrapArray") collection.RefWrapArray - create_equalities (name + ".UnionArray") collection.UnionArray - create_equalities (name + ".UnionWrapArray") collection.UnionWrapArray - create_equalities (name + ".ValueArray") collection.ValueArray - create_equalities (name + ".ValueWrapArray") collection.ValueWrapArray - create_equalities (name + ".ArrayArray") collection.ArrayArray - create_equalities (name + ".ListArray") collection.ListArray - - let createData () = - create_collection_inequalities "Bools.Collection" Bools.Collection - create_collection_equalities "NullableBools.Collection" NullableBools.Collection - create_collection_inequalities "SBytes.Collection" SBytes.Collection - create_collection_equalities "NullableSbytes.Collection" NullableSbytes.Collection - create_collection_inequalities "Int16s.Collection" Int16s.Collection - create_collection_equalities "NullableInt16s.Collection" NullableInt16s.Collection - create_collection_inequalities "Int32s.Collection" Int32s.Collection - create_collection_equalities "NullableInt32s.Collection" NullableInt32s.Collection - create_collection_inequalities "Int64s.Collection" Int64s.Collection - create_collection_equalities "NullableInt64s.Collection" NullableInt64s.Collection - create_collection_inequalities "NativeInts.Collection" NativeInts.Collection - create_collection_equalities "NullableNativeInts.Collection" NullableNativeInts.Collection - create_collection_inequalities "Bytes.Collection" Bytes.Collection - create_collection_equalities "NullableBytes.Collection" NullableBytes.Collection - create_collection_inequalities "Uint16s.Collection" Uint16s.Collection - create_collection_equalities "NullableUInt16s.Collection" NullableUInt16s.Collection - create_collection_inequalities "UInt32s.Collection" UInt32s.Collection - create_collection_equalities "NullableUInt32s.Collection" NullableUInt32s.Collection - create_collection_inequalities "UInt64s.Collection" UInt64s.Collection - create_collection_equalities "NullableUInt64s.Collection" NullableUInt64s.Collection - create_collection_inequalities "UNativeInts.Collection" UNativeInts.Collection - create_collection_equalities "NullableUNativeInts.Collection" NullableUNativeInts.Collection - create_collection_inequalities "Chars.Collection" Chars.Collection - create_collection_equalities "NullableChars.Collection" NullableChars.Collection - create_collection_inequalities "Strings.Collection" Strings.Collection - create_collection_inequalities "Decimals.Collection" Decimals.Collection - create_collection_equalities "NullableDecimals.Collection" NullableDecimals.Collection - create_collection_inequalities "Floats.Collection" Floats.Collection - create_collection_equalities "NullableFloats.Collection" NullableFloats.Collection - create_collection_inequalities "Float32s.Collection" Float32s.Collection - create_collection_equalities "NullableFloat32s.Collection" NullableFloat32s.Collection - create_collection_inequalities "DateTimes.Collection" DateTimes.Collection - create_collection_equalities "NullableDateTimes.Collection" NullableDateTimes.Collection - create_collection_inequalities "Tuple2s.Collection" Tuple2s.Collection - create_tuples_tests "Tuple3s.Collection" Tuple3s.Collection - create_tuples_tests "Tuple4s.Collection" Tuple4s.Collection - create_tuples_tests "Tuple5s.Collection" Tuple5s.Collection -#endif + module TestGenerationMethods = + let create<'a,'b when 'b : equality> name operation (f:IOperation<'a>) (items:array<'a>) = + printf """ [] + member _.``%s %s``() = + validate (%s) %s """ name operation name operation + + make_result_set f items None + |> Seq.iteri (fun n result -> + if n = 0 + then printf "[|" + else printf ";" + if n % 40 = 0 then printf "\n " + printf "%d" result) + printfn "\n |]\n" + + let create_inequalities name (items:array<'a>) = + create name "C.I.equals" C.I.equals items + create name "C.I.equal" C.I.equal items + create name "C.I.not_equal" C.I.not_equal items + create name "C.I.compare" C.I.compare items + create name "C.I.less_than" C.I.less_than items + create name "C.I.less_or_equal" C.I.less_or_equal items + create name "C.I.greater_than" C.I.greater_than items + create name "C.I.greater_or_equal" C.I.greater_or_equal items + create name "C.N.equals" C.N.equals items + create name "C.N.equal" C.N.equal items + create name "C.N.not_equal" C.N.not_equal items + create name "C.N.compare" C.N.compare items + create name "C.N.less_than" C.N.less_than items + create name "C.N.less_or_equal" C.N.less_or_equal items + create name "C.N.greater_than" C.N.greater_than items + create name "C.N.greater_or_equal" C.N.greater_or_equal items + + let create_equalities name (items:array<'a>) = + create name "E.I.equals" E.I.equals items + create name "E.I.equal" E.I.equal items + create name "E.I.not_equal" E.I.not_equal items + create name "E.N.equals" E.N.equals items + create name "E.N.equal" E.N.equal items + create name "E.N.not_equal" E.N.not_equal items + + let create_collection_inequalities name (collection:Collection<_,_,_,_>) = + create_inequalities (name + ".Array") collection.Array + create_inequalities (name + ".OptionArray") collection.OptionArray + create_inequalities (name + ".RefArray") collection.RefArray + create_inequalities (name + ".RefWrapArray") collection.RefWrapArray + create_inequalities (name + ".UnionArray") collection.UnionArray + create_inequalities (name + ".UnionWrapArray") collection.UnionWrapArray + create_inequalities (name + ".ValueArray") collection.ValueArray + create_inequalities (name + ".ValueWrapArray") collection.ValueWrapArray + create_inequalities (name + ".ArrayArray") collection.ArrayArray + create_inequalities (name + ".ListArray") collection.ListArray + create_inequalities (name + ".ArrayArray |> Array.map Set.ofArray") (collection.ArrayArray |> Array.map Set.ofArray) + + let create_tuples_tests name (collection:Collection<_,_,_,_>) = + create_inequalities (name + ".Array") collection.Array + + let create_collection_equalities name (collection:Collection<_,_,_,_>) = + create_equalities (name + ".Array") collection.Array + create_equalities (name + ".OptionArray") collection.OptionArray + create_equalities (name + ".RefArray") collection.RefArray + create_equalities (name + ".RefWrapArray") collection.RefWrapArray + create_equalities (name + ".UnionArray") collection.UnionArray + create_equalities (name + ".UnionWrapArray") collection.UnionWrapArray + create_equalities (name + ".ValueArray") collection.ValueArray + create_equalities (name + ".ValueWrapArray") collection.ValueWrapArray + create_equalities (name + ".ArrayArray") collection.ArrayArray + create_equalities (name + ".ListArray") collection.ListArray + + let createData () = + create_collection_inequalities "Bools.Collection" Bools.Collection + create_collection_equalities "NullableBools.Collection" NullableBools.Collection + create_collection_inequalities "SBytes.Collection" SBytes.Collection + create_collection_equalities "NullableSbytes.Collection" NullableSbytes.Collection + create_collection_inequalities "Int16s.Collection" Int16s.Collection + create_collection_equalities "NullableInt16s.Collection" NullableInt16s.Collection + create_collection_inequalities "Int32s.Collection" Int32s.Collection + create_collection_equalities "NullableInt32s.Collection" NullableInt32s.Collection + create_collection_inequalities "Int64s.Collection" Int64s.Collection + create_collection_equalities "NullableInt64s.Collection" NullableInt64s.Collection + create_collection_inequalities "NativeInts.Collection" NativeInts.Collection + create_collection_equalities "NullableNativeInts.Collection" NullableNativeInts.Collection + create_collection_inequalities "Bytes.Collection" Bytes.Collection + create_collection_equalities "NullableBytes.Collection" NullableBytes.Collection + create_collection_inequalities "Uint16s.Collection" Uint16s.Collection + create_collection_equalities "NullableUInt16s.Collection" NullableUInt16s.Collection + create_collection_inequalities "UInt32s.Collection" UInt32s.Collection + create_collection_equalities "NullableUInt32s.Collection" NullableUInt32s.Collection + create_collection_inequalities "UInt64s.Collection" UInt64s.Collection + create_collection_equalities "NullableUInt64s.Collection" NullableUInt64s.Collection + create_collection_inequalities "UNativeInts.Collection" UNativeInts.Collection + create_collection_equalities "NullableUNativeInts.Collection" NullableUNativeInts.Collection + create_collection_inequalities "Chars.Collection" Chars.Collection + create_collection_equalities "NullableChars.Collection" NullableChars.Collection + create_collection_inequalities "Strings.Collection" Strings.Collection + create_collection_inequalities "Decimals.Collection" Decimals.Collection + create_collection_equalities "NullableDecimals.Collection" NullableDecimals.Collection + create_collection_inequalities "Floats.Collection" Floats.Collection + create_collection_equalities "NullableFloats.Collection" NullableFloats.Collection + create_collection_inequalities "Float32s.Collection" Float32s.Collection + create_collection_equalities "NullableFloat32s.Collection" NullableFloat32s.Collection + create_collection_inequalities "DateTimes.Collection" DateTimes.Collection + create_collection_equalities "NullableDateTimes.Collection" NullableDateTimes.Collection + create_collection_inequalities "Tuple2s.Collection" Tuple2s.Collection + create_tuples_tests "Tuple3s.Collection" Tuple3s.Collection + create_tuples_tests "Tuple4s.Collection" Tuple4s.Collection + create_tuples_tests "Tuple5s.Collection" Tuple5s.Collection + let validate (items:array<'a>) (f:IOperation<'a>) (expected:array) = try diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs index 2edf022ac7..a0ce305422 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs @@ -453,15 +453,6 @@ type AsyncModule() = member _.``RaceBetweenCancellationAndError.Sleep``() = testErrorAndCancelRace "RaceBetweenCancellationAndError.Sleep" (Async.Sleep (-5)) -#if EXPENSIVE -#if NET46 - [] // takes 3 minutes! - member _.``Async.Choice specification test``() = - ThreadPool.SetMinThreads(100,100) |> ignore - Check.One ({Config.QuickThrowOnFailure with EndSize = 20}, normalize >> runChoice) -#endif -#endif - [] member _.``dispose should not throw when called on null``() = let result = async { use x = null in return () } |> Async.RunSynchronously diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs index 0c5e7435ae..018f7419c9 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs @@ -142,10 +142,6 @@ type LanguagePrimitivesModule() = let resultRef = LanguagePrimitives.GenericComparison "ABC" null Assert.AreEqual(1, resultRef) - -#if NETSTANDARD1_6 || NETCOREAPP -// TODO named #define ? -#else [] member this.GenericComparisonBiModal() = // value type @@ -178,8 +174,6 @@ type LanguagePrimitivesModule() = let resultRef = LanguagePrimitives.GenericComparisonWithComparer System.Collections.Comparer.Default null "abc" Assert.AreEqual(-1, sign resultRef) -#endif - [] member this.GenericEquality() = // value type @@ -735,9 +729,6 @@ type UnitType() = let u:Unit = () CheckThrowsNullRefException(fun() ->u.Equals(null) |>ignore) -#if NETSTANDARD1_6 || NETCOREAPP -// TODO named #define ? -#else type SourceConstructFlagsEnum() = [] @@ -747,15 +738,12 @@ type SourceConstructFlagsEnum() = "KindMask";"NonPublicRepresentation" |] Assert.AreEqual(names, SourceConstructFlags.GetNames(typeof)) - type CompilationRepresentationFlagsEnum() = [] member this.Getvalue() = let names = [| "None";"Static";"Instance";"ModuleSuffix";"UseNullAsTrueValue";"Event" |] Assert.AreEqual(names, SourceConstructFlags.GetNames(typeof)) -#endif - type MiscStuff() = diff --git a/tests/FSharp.Core.UnitTests/TypeForwarding.fs b/tests/FSharp.Core.UnitTests/TypeForwarding.fs deleted file mode 100644 index 524d62e65e..0000000000 --- a/tests/FSharp.Core.UnitTests/TypeForwarding.fs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -// Various tests for Microsoft.FSharp.Core type forwarding - -namespace FSharp.Core.UnitTests.Type_Forwarding - -open System -open FSharp.Core.UnitTests.LibraryTestFx -open Xunit - -#if NET46 -[] -type TypeForwardingModule() = - [] - member this.TypeForwarding() = - let currentRuntimeVersion = System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion() - let currentFSharpCoreTargetRuntime = typeof.Assembly.ImageRuntimeVersion - let tupleAssemblyName = typeof>.Assembly.FullName - - let mscorlib4AssemblyName = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" - let fsharpCore2AssemblyName = "FSharp.Core, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" - - printfn "currentRuntimeVersion = %s; currentFSharpCoreTargetRuntime=%s tupleAssemblyName=%s" currentRuntimeVersion currentFSharpCoreTargetRuntime tupleAssemblyName - match (currentRuntimeVersion, currentFSharpCoreTargetRuntime) with - | ("v2.0.50727", _) - | ("v4.0.30319", "v2.0.50727") -> - Assert.AreEqual(tupleAssemblyName, fsharpCore2AssemblyName) - | ("v4.0.30319", "v4.0.30319") -> - Assert.AreEqual(tupleAssemblyName, mscorlib4AssemblyName) - | _ -> failwith "Unknown scenario." - () -#else -// TODO named #define ? -#endif \ No newline at end of file diff --git a/tests/FSharp.Test.Utilities/Utilities.fs b/tests/FSharp.Test.Utilities/Utilities.fs index f74faf49fa..1c6781fdd9 100644 --- a/tests/FSharp.Test.Utilities/Utilities.fs +++ b/tests/FSharp.Test.Utilities/Utilities.fs @@ -14,6 +14,24 @@ open Microsoft.CodeAnalysis.CSharp open TestFramework open NUnit.Framework +type TheoryForNETCOREAPPAttribute() = + inherit Xunit.TheoryAttribute() + #if !NETCOREAPP + do base.Skip <- "Only NETCOREAPP is supported runtime for this kind of test." + #endif + +type FactForNETCOREAPPAttribute() = + inherit Xunit.FactAttribute() + #if !NETCOREAPP + do base.Skip <- "Only NETCOREAPP is supported runtime for this kind of test." + #endif + +type FactForDESKTOPAttribute() = + inherit Xunit.FactAttribute() + #if NETCOREAPP + do base.Skip <- "NETCOREAPP is not supported runtime for this kind of test, it is intended for DESKTOP only" + #endif + // This file mimics how Roslyn handles their compilation references for compilation testing module Utilities = diff --git a/tests/scripts/scriptlib.fsx b/tests/scripts/scriptlib.fsx index 55ef0f3e47..071196cf87 100644 --- a/tests/scripts/scriptlib.fsx +++ b/tests/scripts/scriptlib.fsx @@ -111,12 +111,7 @@ module Scripting = processInfo.UseShellExecute <- false processInfo.WorkingDirectory <- workDir -#if !NET46 ignore envs // work out what to do about this -#else - envs - |> Map.iter (fun k v -> processInfo.EnvironmentVariables.[k] <- v) -#endif let p = new Process() p.EnableRaisingEvents <- true