@@ -1675,34 +1675,6 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty =
1675
1675
let qname = QualifiedNameOfFile.QualifiedNameOfFile( Ident( moduleName, m))
1676
1676
entity, v, CheckedImplFile.CheckedImplFile( qname, [], mty, contents, false , false , StampMap.Empty, Map.empty)
1677
1677
1678
- let scriptingSymbolsPath =
1679
- let createDirectory ( path : string ) =
1680
- lazy
1681
- try
1682
- if not ( Directory.Exists( path)) then
1683
- Directory.CreateDirectory( path) |> ignore
1684
-
1685
- path
1686
- with _ ->
1687
- path
1688
-
1689
- createDirectory ( Path.Combine( Path.GetTempPath(), $" {DateTime.Now:s}-{Guid.NewGuid():n}" .Replace( ':' , '-' )))
1690
-
1691
- let deleteScriptingSymbols () =
1692
- try
1693
- #if ! DEBUG
1694
- if scriptingSymbolsPath.IsValueCreated then
1695
- if Directory.Exists( scriptingSymbolsPath.Value) then
1696
- Directory.Delete( scriptingSymbolsPath.Value, true )
1697
- #else
1698
- ()
1699
- #endif
1700
- with _ ->
1701
- ()
1702
-
1703
- AppDomain.CurrentDomain.ProcessExit
1704
- |> Event.add ( fun _ -> deleteScriptingSymbols ())
1705
-
1706
1678
let dynamicCcuName = " FSI-ASSEMBLY"
1707
1679
1708
1680
/// Encapsulates the coordination of the typechecking, optimization and code generation
@@ -1764,6 +1736,33 @@ type internal FsiDynamicCompiler
1764
1736
1765
1737
let reportedAssemblies = Dictionary< string, DateTime>()
1766
1738
1739
+ let scriptingSymbolsPath =
1740
+ let createDirectory ( path : string ) =
1741
+ try
1742
+ if not ( Directory.Exists( path)) then
1743
+ Directory.CreateDirectory( path) |> ignore
1744
+
1745
+ path
1746
+ with _ ->
1747
+ path
1748
+
1749
+ createDirectory ( Path.Combine( Path.GetTempPath(), $" {DateTime.Now:s}-{Guid.NewGuid():n}" .Replace( ':' , '-' )))
1750
+
1751
+ let deleteScriptingSymbols () =
1752
+ try
1753
+ #if ! DEBUG
1754
+ if Directory.Exists( scriptingSymbolsPath) then
1755
+ Directory.Delete( scriptingSymbolsPath, true )
1756
+ #else
1757
+ ()
1758
+ #endif
1759
+ with _ ->
1760
+ ()
1761
+
1762
+ do
1763
+ AppDomain.CurrentDomain.ProcessExit
1764
+ |> Event.add ( fun _ -> deleteScriptingSymbols ())
1765
+
1767
1766
/// Add attributes
1768
1767
let CreateModuleFragment ( tcConfigB : TcConfigBuilder , dynamicCcuName , codegenResults ) =
1769
1768
if progress then
@@ -1841,7 +1840,7 @@ type internal FsiDynamicCompiler
1841
1840
{
1842
1841
ilg = tcGlobals.ilg
1843
1842
outfile = $" {multiAssemblyName}-{dynamicAssemblyId}.dll"
1844
- pdbfile = Some( Path.Combine( scriptingSymbolsPath.Value , $" {multiAssemblyName}-{dynamicAssemblyId}.pdb" ))
1843
+ pdbfile = Some( Path.Combine( scriptingSymbolsPath, $" {multiAssemblyName}-{dynamicAssemblyId}.pdb" ))
1845
1844
emitTailcalls = tcConfig.emitTailcalls
1846
1845
deterministic = tcConfig.deterministic
1847
1846
portablePDB = true
0 commit comments