From 21ac1b04d9b9c3ac7f7f7df42dee243575eaebaa Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Tue, 21 Feb 2023 22:48:19 -0800 Subject: [PATCH 1/2] #if out a couple of unused variables --- src/Compiler/Driver/StaticLinking.fs | 5 +++++ src/Compiler/TypedTree/TypedTreePickle.fs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/Compiler/Driver/StaticLinking.fs b/src/Compiler/Driver/StaticLinking.fs index 972f55fc70c..9abc342bb7b 100644 --- a/src/Compiler/Driver/StaticLinking.fs +++ b/src/Compiler/Driver/StaticLinking.fs @@ -98,7 +98,9 @@ type TypeForwarding(tcImports: TcImports) = member _.TypeForwardILTypeRef tref = typeForwardILTypeRef tref +#if !NO_TYPEPROVIDERS let debugStaticLinking = isEnvVarSet "FSHARP_DEBUG_STATIC_LINKING" +#endif let StaticLinkILModules ( @@ -419,6 +421,8 @@ let FindDependentILModulesForStaticLinking (ctok, tcConfig: TcConfig, tcImports: (n.ccu, n.data) ] + +#if !NO_TYPEPROVIDERS // Add all provider-generated assemblies into the static linking set let FindProviderGeneratedILModules (ctok, tcImports: TcImports, providerGeneratedAssemblies: (ImportedBinary * _) list) = [ @@ -442,6 +446,7 @@ let FindProviderGeneratedILModules (ctok, tcImports: TcImports, providerGenerate (ccu, dllInfo.ILScopeRef, modul), (ilAssemRef.Name, provAssemStaticLinkInfo) | None -> () ] +#endif /// Split the list into left, middle and right parts at the first element satisfying 'p'. If no element matches return /// 'None' for the middle part. diff --git a/src/Compiler/TypedTree/TypedTreePickle.fs b/src/Compiler/TypedTree/TypedTreePickle.fs index 13df0443f5c..818d36ecc9c 100644 --- a/src/Compiler/TypedTree/TypedTreePickle.fs +++ b/src/Compiler/TypedTree/TypedTreePickle.fs @@ -29,7 +29,9 @@ open FSharp.Compiler.TypedTreeBasics open FSharp.Compiler.TypedTreeOps open FSharp.Compiler.TcGlobals +#if !NO_TYPEPROVIDERS let verbose = false +#endif let ffailwith fileName str = let msg = FSComp.SR.pickleErrorReadingWritingMetadata(fileName, str) From d6ef5b2abf26f6e3419704b3d0a0a5395651f457 Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Tue, 21 Feb 2023 23:01:31 -0800 Subject: [PATCH 2/2] fantomas --- src/Compiler/Driver/StaticLinking.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Compiler/Driver/StaticLinking.fs b/src/Compiler/Driver/StaticLinking.fs index 9abc342bb7b..443294a9b6f 100644 --- a/src/Compiler/Driver/StaticLinking.fs +++ b/src/Compiler/Driver/StaticLinking.fs @@ -421,7 +421,6 @@ let FindDependentILModulesForStaticLinking (ctok, tcConfig: TcConfig, tcImports: (n.ccu, n.data) ] - #if !NO_TYPEPROVIDERS // Add all provider-generated assemblies into the static linking set let FindProviderGeneratedILModules (ctok, tcImports: TcImports, providerGeneratedAssemblies: (ImportedBinary * _) list) =