diff --git a/ghcide/session-loader/Development/IDE/Session.hs b/ghcide/session-loader/Development/IDE/Session.hs index c1225a4f40..4f0dc3bbb5 100644 --- a/ghcide/session-loader/Development/IDE/Session.hs +++ b/ghcide/session-loader/Development/IDE/Session.hs @@ -268,7 +268,7 @@ loadWithImplicitCradle mHieYaml rootDir = do getInitialGhcLibDirDefault :: Recorder (WithPriority Log) -> FilePath -> IO (Maybe LibDir) getInitialGhcLibDirDefault recorder rootDir = do - hieYaml <- findCradle def rootDir + hieYaml <- findCradle def (rootDir "a") cradle <- loadCradle def hieYaml rootDir libDirRes <- getRuntimeGhcLibDir (toCologActionWithPrio (cmapWithPrio LogHieBios recorder)) cradle case libDirRes of diff --git a/hls-test-utils/src/Test/Hls.hs b/hls-test-utils/src/Test/Hls.hs index a52e46f950..9320e3b300 100644 --- a/hls-test-utils/src/Test/Hls.hs +++ b/hls-test-utils/src/Test/Hls.hs @@ -618,6 +618,7 @@ runSessionWithServer' plugins conf sconf caps root s = withLock lock $ keepCurr , argsDefaultHlsConfig = conf , argsLogger = argsLogger , argsIdeOptions = ideOptions + , argsProjectRoot = Just root } x <- runSessionWithHandles inW outR sconf' caps root s diff --git a/src/Ide/Main.hs b/src/Ide/Main.hs index b6ee489d7c..726eebc524 100644 --- a/src/Ide/Main.hs +++ b/src/Ide/Main.hs @@ -90,7 +90,7 @@ defaultMain recorder args idePlugins = do BiosMode PrintCradleType -> do dir <- IO.getCurrentDirectory - hieYaml <- Session.findCradle def dir + hieYaml <- Session.findCradle def (dir "a") cradle <- Session.loadCradle def hieYaml dir print cradle