Skip to content

Commit eed639b

Browse files
committed
temp
1 parent 6255d54 commit eed639b

File tree

1 file changed

+13
-16
lines changed
  • src/Compiler/Interactive

1 file changed

+13
-16
lines changed

src/Compiler/Interactive/fsi.fs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,37 +1329,34 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty =
13291329
entity, v, CheckedImplFile.CheckedImplFile(qname, [], mty, contents, false, false, StampMap.Empty, Map.empty)
13301330

13311331

1332-
let scriptingDirectory =
1333-
let createDirectory directory =
1332+
let scriptingSymbolsPath =
1333+
let createDirectory path =
13341334
lazy
13351335
try
1336-
if not (Directory.Exists(directory)) then
1337-
Directory.CreateDirectory(directory) |> ignore
1336+
if not (Directory.Exists(path)) then
1337+
Directory.CreateDirectory(path) |> ignore
13381338

1339-
directory
1339+
path
13401340
with _ ->
1341-
directory
1341+
path
13421342

13431343
createDirectory (Path.Combine(Path.GetTempPath(), $"{DateTime.Now:s}-{Guid.NewGuid():n}".Replace(':', '-')))
13441344

1345-
let deleteScripts () =
1345+
let deleteScriptingSymbols () =
13461346
try
13471347
#if !DEBUG
1348-
if scriptingDirectory.IsValueCreated then
1349-
if Directory.Exists(scriptingDirectory.Value) then
1350-
Directory.Delete(scriptingDirectory.Value, true)
1348+
if scriptingSymbolsPath.IsValueCreated then
1349+
if Directory.Exists(scriptingSymbolsPath.Value) then
1350+
Directory.Delete(scriptingSymbolsPath.Value, true)
13511351
#else
13521352
()
13531353
#endif
13541354
with _ ->
13551355
()
13561356

1357-
do AppDomain.CurrentDomain.ProcessExit |> Event.add (fun _ -> deleteScripts ())
1358-
1359-
1357+
AppDomain.CurrentDomain.ProcessExit |> Event.add (fun _ -> deleteScriptingSymbols ())
13601358

13611359
let dynamicCcuName = "FSI-ASSEMBLY"
1362-
let dynamicCCuInternalsVisibleArgument = $"{dynamicCcuName}"
13631360

13641361
/// Encapsulates the coordination of the typechecking, optimization and code generation
13651362
/// components of the F# compiler for interactively executed fragments of code.
@@ -1436,7 +1433,7 @@ type internal FsiDynamicCompiler(
14361433
let manifest =
14371434
let manifest = ilxMainModule.Manifest.Value
14381435
let attrs = [
1439-
tcGlobals.MakeInternalsVisibleToAttribute(dynamicCCuInternalsVisibleArgument)
1436+
tcGlobals.MakeInternalsVisibleToAttribute(dynamicCcuName)
14401437
yield! manifest.CustomAttrs.AsList()
14411438
]
14421439
{ manifest with
@@ -1458,7 +1455,7 @@ type internal FsiDynamicCompiler(
14581455
let opts = {
14591456
ilg = tcGlobals.ilg
14601457
outfile = multiAssemblyName + ".dll"
1461-
pdbfile = Some (Path.Combine(scriptingDirectory.Value, $"{multiAssemblyName}-{dynamicAssemblyId}.pdb"))
1458+
pdbfile = Some (Path.Combine(scriptingSymbolsPath.Value, $"{multiAssemblyName}-{dynamicAssemblyId}.pdb"))
14621459
emitTailcalls = tcConfig.emitTailcalls
14631460
deterministic = tcConfig.deterministic
14641461
portablePDB = true

0 commit comments

Comments
 (0)