Skip to content

Set the root for tests to the test directory #3830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions hls-test-utils/src/Test/Hls.hs
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/Ide/Main.hs
Original file line number Diff line number Diff line change
@@ -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