Skip to content

Commit a530755

Browse files
committed
Strip RTS and verbosity flags after -unit flag parsing
1 parent bce8944 commit a530755

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import qualified HIE.Bios as HieBios
7070
import HIE.Bios.Environment hiding (getCacheDir)
7171
import HIE.Bios.Types hiding (Log)
7272
import qualified HIE.Bios.Types as HieBios
73+
import qualified HIE.Bios.Cradle.Utils as HieBios
7374
import Ide.Logger (Pretty (pretty),
7475
Priority (Debug, Error, Info, Warning),
7576
Recorder, WithPriority,
@@ -1144,7 +1145,10 @@ setOptions cfp (ComponentOptions theOpts compRoot _) dflags rootDir = do
11441145
initMulti unitArgFiles =
11451146
forM unitArgFiles $ \f -> do
11461147
args <- liftIO $ expandResponse [f]
1147-
initOne args
1148+
-- The reponse files may contain arguments like "+RTS",
1149+
-- and hie-bios doesn't expand the response files of @-unit@ arguments.
1150+
-- Thus, we need to do the stripping here.
1151+
initOne $ HieBios.removeRTS $ HieBios.removeVerbosityOpts args
11481152
initOne this_opts = do
11491153
(dflags', targets') <- addCmdOpts this_opts dflags
11501154
let dflags'' =

0 commit comments

Comments
 (0)