Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit965cf3c

Browse files
dsymedsyme
dsyme
authored and
dsyme
committed
add WPF path to fsi.exe and cleanup resolution flags
1 parent7bc69c4 commit965cf3c

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

‎src/fsharp/CompileOps.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ type TcConfigBuilder =
22132213
useFsiAuxLib=false
22142214
implicitOpens=[]
22152215
includes=[]
2216-
resolutionEnvironment=ResolutionEnvironment.EditingAndCompilationfalse
2216+
resolutionEnvironment=ResolutionEnvironment.EditingOrCompilationfalse
22172217
framework=true
22182218
implicitlyResolveAssemblies=true
22192219
referencedDLLs=[]
@@ -2825,7 +2825,7 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
28252825
if Directory.Exists(runtimeRootWPF)then
28262826
yield runtimeRootWPF// PresentationCore.dll is in C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF
28272827

2828-
| ResolutionEnvironment.EditingAndCompilation_->
2828+
| ResolutionEnvironment.EditingOrCompilation_->
28292829
if runningOnMonothen
28302830
// Default compilation-time references on Mono
28312831
//
@@ -4914,12 +4914,12 @@ module private ScriptPreprocessClosure =
49144914

49154915
tcConfigB.resolutionEnvironment<-
49164916
match codeContextwith
4917-
| CodeContext.Editing-> ResolutionEnvironment.EditingAndCompilationtrue
4918-
| CodeContext.Compilation-> ResolutionEnvironment.EditingAndCompilationfalse
4917+
| CodeContext.Editing-> ResolutionEnvironment.EditingOrCompilationtrue
4918+
| CodeContext.Compilation-> ResolutionEnvironment.EditingOrCompilationfalse
49194919
| CodeContext.CompilationAndEvaluation->
49204920
#if FSI_TODO_NETCORE
49214921
// "CompilationAndEvaluation" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
4922-
ResolutionEnvironment.EditingAndCompilationfalse
4922+
ResolutionEnvironment.EditingOrCompilationfalse
49234923
#else
49244924
ResolutionEnvironment.CompilationAndEvaluation
49254925
#endif

‎src/fsharp/MSBuildReferenceResolver.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ module internal Microsoft.FSharp.Compiler.MSBuildReferenceResolver
288288
letregistry= sprintf"{Registry:%s,%s,%s%s}" frameworkRegistryBase targetFrameworkVersion assemblyFoldersSuffix assemblyFoldersConditions
289289

290290
[|// When compiling scripts using fsc.exe, for some reason we have always historically put TargetFrameworkDirectory first
291-
// It is unclear why. This is the only place we look at the 'isdifference between ResolutionEnvironment.EditingAndCompilation and ResolutionEnvironment.EditingTime.
291+
// It is unclear why. This is the only place we look at the 'isdifference between ResolutionEnvironment.EditingOrCompilation and ResolutionEnvironment.EditingTime.
292292
match resolutionEnvironmentwith
293-
| ResolutionEnvironment.EditingAndCompilationfalse->yield"{TargetFrameworkDirectory}"
294-
| ResolutionEnvironment.EditingAndCompilationtrue
293+
| ResolutionEnvironment.EditingOrCompilationfalse->yield"{TargetFrameworkDirectory}"
294+
| ResolutionEnvironment.EditingOrCompilationtrue
295295
| ResolutionEnvironment.CompilationAndEvaluation->()
296296

297297
// Quick-resolve straight to filename first
@@ -302,9 +302,9 @@ module internal Microsoft.FSharp.Compiler.MSBuildReferenceResolver
302302
yield implicitIncludeDir// Usually the project directory
303303

304304
match resolutionEnvironmentwith
305-
| ResolutionEnvironment.EditingAndCompilationtrue
305+
| ResolutionEnvironment.EditingOrCompilationtrue
306306
| ResolutionEnvironment.CompilationAndEvaluation->yield"{TargetFrameworkDirectory}"
307-
| ResolutionEnvironment.EditingAndCompilationfalse->()
307+
| ResolutionEnvironment.EditingOrCompilationfalse->()
308308

309309
yield registry
310310
yield"{AssemblyFolders}"

‎src/fsharp/ReferenceResolver.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ module internal ReferenceResolver =
1212

1313
[<RequireQualifiedAccess>]
1414
typeResolutionEnvironment=
15-
/// Indicates a script or source being compiled. Uses reference assemblies (not implementation assemblies).
16-
|EditingAndCompilationofisEditing:bool
15+
/// Indicates a script or source beingedited orcompiled. Uses reference assemblies (not implementation assemblies).
16+
|EditingOrCompilationofisEditing:bool
1717
/// Indicates a script or source being dynamically compiled and executed. Uses implementation assemblies.
1818
| CompilationAndEvaluation
1919

‎src/fsharp/SimulatedMSBuildReferenceResolver.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ let fscoreDir =
208208
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
209209

210210
letresolve s=
211-
SimulatedMSBuildResolver.Resolve(ResolutionEnvironment.EditingAndCompilation,[|for ain s->(a,"")|],"v4.5.1",[SimulatedMSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectory+@"\v4.5.1"],"","", fscoreDir,[],__SOURCE_DIRECTORY__,ignore,(fun _ _->()),(fun _ _->()))
211+
SimulatedMSBuildResolver.Resolve(ResolutionEnvironment.EditingOrCompilation,[|for ain s->(a,"")|],"v4.5.1",[SimulatedMSBuildResolver.DotNetFrameworkReferenceAssembliesRootDirectory+@"\v4.5.1"],"","", fscoreDir,[],__SOURCE_DIRECTORY__,ignore,(fun _ _->()),(fun _ _->()))
212212

213213
// Resolve partial name to something on search path
214214
resolve["FSharp.Core"]

‎src/fsharp/fsi/fsi.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
24642464

24652465
#if FSI_TODO_NETCORE
24662466
// "CompilationAndEvaluation" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
2467-
do tcConfigB.resolutionEnvironment<- ResolutionEnvironment.EditingAndCompilationfalse
2467+
do tcConfigB.resolutionEnvironment<- ResolutionEnvironment.EditingOrCompilationfalse
24682468
do tcConfigB.useSimpleResolution<-true
24692469
do SetTargetProfile tcConfigB"netcore"// always assume System.Runtime codegen
24702470
//do SetTargetProfile tcConfigB "privatecorelib" // always assume System.Private.CoreLib codegen

‎src/fsharp/vs/IncrementalBuild.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,7 @@ type IncrementalBuilder(tcGlobals,frameworkTcImports, nonFrameworkAssemblyInputs
17021702
// Could detect well-known assemblies--ie System.dll--and open them with read-locks
17031703
tcConfigB.openBinariesInMemory<-true
17041704

1705-
tcConfigB.resolutionEnvironment<-(ReferenceResolver.ResolutionEnvironment.EditingAndCompilationtrue)
1705+
tcConfigB.resolutionEnvironment<-(ReferenceResolver.ResolutionEnvironment.EditingOrCompilationtrue)
17061706

17071707
tcConfigB.conditionalCompilationDefines<-
17081708
letdefine=if useScriptResolutionRulesthen"INTERACTIVE"else"COMPILED"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp