Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit 79430d2

Browse files
authored
simplify use of if-defs (dotnet#1614)
1 parent b708921 commit 79430d2

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/FSharpSource.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
<DefineConstants>$(DefineConstants);PUT_TYPE_PROVIDERS_IN_FSCORE;</DefineConstants>
122122
<DefineConstants>$(DefineConstants);FX_ATLEAST_LINQ</DefineConstants>
123123
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
124-
<DefineConstants>$(DefineConstants);FX_MSBUILDRESOLVER_RUNTIMELIKE</DefineConstants>
125124
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
126125
<DefineConstants>$(DefineConstants);FX_RESX_RESOURCE_READER</DefineConstants>
127126
<DefineConstants>$(DefineConstants);FX_RESIDENT_COMPILER</DefineConstants>

src/fsharp/CompileOps.fs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,9 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
28112811
#endif
28122812
try
28132813
match tcConfig.resolutionEnvironment with
2814-
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
2814+
#if TODO_REWORK_ASSEMBLY_LOAD
2815+
// "RuntimeLike" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
2816+
#else
28152817
| ReferenceResolver.RuntimeLike ->
28162818
[System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()]
28172819
#endif
@@ -4854,10 +4856,11 @@ module private ScriptPreprocessClosure =
48544856
tcConfigB.resolutionEnvironment <-
48554857
match codeContext with
48564858
| CodeContext.Editing -> ReferenceResolver.DesignTimeLike
4857-
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
4858-
| CodeContext.Compilation | CodeContext.Evaluation -> ReferenceResolver.RuntimeLike
4859-
#else
4859+
#if TODO_REWORK_ASSEMBLY_LOAD
4860+
// "RuntimeLike" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
48604861
| CodeContext.Compilation | CodeContext.Evaluation -> ReferenceResolver.CompileTimeLike
4862+
#else
4863+
| CodeContext.Compilation | CodeContext.Evaluation -> ReferenceResolver.RuntimeLike
48614864
#endif
48624865
tcConfigB.framework <- false
48634866
// Indicates that there are some references not in BasicReferencesForScriptLoadClosure which should

src/fsharp/fsi/fsi.fs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,10 +2217,11 @@ type internal FsiEvaluationSession (argv:string[], inReader:TextReader, outWrite
22172217
Directory.GetCurrentDirectory(),isInteractive=true,
22182218
isInvalidationSupported=false)
22192219
let tcConfigP = TcConfigProvider.BasedOnMutableBuilder(tcConfigB)
2220-
#if FX_MSBUILDRESOLVER_RUNTIMELIKE
2221-
do tcConfigB.resolutionEnvironment <- ReferenceResolver.RuntimeLike // See Bug 3608
2222-
#else
2220+
#if TODO_REWORK_ASSEMBLY_LOAD
2221+
// "RuntimeLike" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
22232222
do tcConfigB.resolutionEnvironment <- ReferenceResolver.DesignTimeLike
2223+
#else
2224+
do tcConfigB.resolutionEnvironment <- ReferenceResolver.RuntimeLike // See Bug 3608
22242225
#endif
22252226
do tcConfigB.useFsiAuxLib <- true
22262227

0 commit comments

Comments
 (0)