Skip to content

Commit 91ea119

Browse files
committed
unique workingDirectory for each in-memory hdv
1 parent b034cc3 commit 91ea119

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

haskell-debugger.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ library
149149

150150
haskell-debugger-view >= 0.2 && < 1.0,
151151
ghc-stack-annotations >=0.1 && <0.2,
152+
uuid,
152153

153154
if !os(windows)
154155
build-depends: unix >= 2.8.6 && < 2.9,

haskell-debugger/GHC/Debugger/Session/Builtin.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module GHC.Debugger.Session.Builtin
1818
)
1919
where
2020

21+
import Data.UUID.V4 qualified as UUID
2122
import Data.FileEmbed
2223
import Data.Function
2324
import Data.Maybe
@@ -95,6 +96,7 @@ addInMemoryHsDebuggerViewUnit
9596
-> DynFlags -- ^ Dynflags resulting from first downsweep of user given targets
9697
-> m ()
9798
addInMemoryHsDebuggerViewUnit base_uids initialDynFlags = do
99+
uuid <- liftIO $ UUID.nextRandom
98100
let imhdv_dflags = initialDynFlags
99101
{ homeUnitId_ = hsDebuggerViewInMemoryUnitId
100102
, importPaths = []
@@ -108,6 +110,7 @@ addInMemoryHsDebuggerViewUnit base_uids initialDynFlags = do
108110
, unitId /= ghcInternalUnitId
109111
]
110112
, thisPackageName = Just "haskell-debugger-view"
113+
, workingDirectory = Just (show uuid)
111114
}
112115
& setGeneralFlag' Opt_HideAllPackages
113116
hsc_env <- getSession

0 commit comments

Comments
 (0)