@@ -31,6 +31,7 @@ module Test.Hls
31
31
runSessionWithServerAndCaps ,
32
32
runSessionWithServerInTmpDir ,
33
33
runSessionWithServerAndCapsInTmpDir ,
34
+ runSessionWithServerNoRootLock ,
34
35
runSessionWithServer' ,
35
36
runSessionWithServerInTmpDir' ,
36
37
-- continuation version that take a FileSystem
@@ -618,7 +619,7 @@ lockForTempDirs = unsafePerformIO newLock
618
619
619
620
-- | Host a server, and run a test session on it
620
621
-- Note: cwd will be shifted into @root@ in @Session a@
621
- runSessionWithServer' ::
622
+ runSessionWithServerNoRootLock ::
622
623
(Pretty b ) =>
623
624
-- | whether we disable the kick action or not
624
625
Bool ->
@@ -632,7 +633,7 @@ runSessionWithServer' ::
632
633
FilePath ->
633
634
Session a ->
634
635
IO a
635
- runSessionWithServer' disableKick pluginsDp conf sconf caps root s = withLock lock $ keepCurrentDirectory $ do
636
+ runSessionWithServerNoRootLock disableKick pluginsDp conf sconf caps root s = do
636
637
(inR, inW) <- createPipe
637
638
(outR, outW) <- createPipe
638
639
@@ -676,6 +677,25 @@ runSessionWithServer' disableKick pluginsDp conf sconf caps root s = withLock l
676
677
putStrLn $ " Finishing canceling (took " <> showDuration t <> " s)"
677
678
pure x
678
679
680
+ -- | Host a server, and run a test session on it
681
+ -- Note: cwd will be shifted into @root@ in @Session a@
682
+ runSessionWithServer' ::
683
+ (Pretty b ) =>
684
+ -- | whether we disable the kick action or not
685
+ Bool ->
686
+ -- | Plugin to load on the server.
687
+ PluginTestDescriptor b ->
688
+ -- | lsp config for the server
689
+ Config ->
690
+ -- | config for the test session
691
+ SessionConfig ->
692
+ ClientCapabilities ->
693
+ FilePath ->
694
+ Session a ->
695
+ IO a
696
+ runSessionWithServer' disableKick pluginsDp conf sconf caps root s =
697
+ withLock lock $ keepCurrentDirectory $ runSessionWithServerNoRootLock disableKick pluginsDp conf sconf caps root s
698
+
679
699
-- | Wait for the next progress begin step
680
700
waitForProgressBegin :: Session ()
681
701
waitForProgressBegin = skipManyTill anyMessage $ satisfyMaybe $ \ case
0 commit comments