@@ -50,7 +50,7 @@ import Development.IDE.Test (Cursor,
50
50
expectNoMoreDiagnostics ,
51
51
flushMessages ,
52
52
standardizeQuotes ,
53
- waitForAction )
53
+ waitForAction , getInterfaceFilesDir )
54
54
import Development.IDE.Test.Runfiles
55
55
import qualified Development.IDE.Types.Diagnostics as Diagnostics
56
56
import Development.IDE.Types.Location
@@ -95,7 +95,7 @@ import Data.Tuple.Extra
95
95
import Development.IDE.Core.FileStore (getModTime )
96
96
import Development.IDE.Plugin.CodeAction (matchRegExMultipleImports )
97
97
import qualified Development.IDE.Plugin.HLS.GhcIde as Ghcide
98
- import Development.IDE.Plugin.Test (TestRequest (BlockSeconds , GetInterfaceFilesDir ),
98
+ import Development.IDE.Plugin.Test (TestRequest (BlockSeconds ),
99
99
WaitForIdeRuleResult (.. ),
100
100
blockCommandId )
101
101
import Ide.PluginUtils (pluginDescToIdePlugins )
@@ -5249,14 +5249,9 @@ ifaceErrorTest = testCase "iface-error-test-1" $ runWithExtraFiles "recomp" $ \d
5249
5249
5250
5250
5251
5251
-- Check that we wrote the interfaces for B when we saved
5252
- let m = SCustomMethod " test"
5253
- lid <- sendRequest m $ toJSON $ GetInterfaceFilesDir bPath
5254
- res <- skipManyTill anyMessage $ responseForId m lid
5255
- liftIO $ case res of
5256
- ResponseMessage {_result= Right (A. fromJSON -> A. Success hidir)} -> do
5257
- hi_exists <- doesFileExist $ hidir </> " B.hi"
5258
- assertBool (" Couldn't find B.hi in " ++ hidir) hi_exists
5259
- _ -> assertFailure $ " Got malformed response for CustomMessage hidir: " ++ show res
5252
+ Right hidir <- getInterfaceFilesDir bdoc
5253
+ hi_exists <- liftIO $ doesFileExist $ hidir </> " B.hi"
5254
+ liftIO $ assertBool (" Couldn't find B.hi in " ++ hidir) hi_exists
5260
5255
5261
5256
pdoc <- createDoc pPath " haskell" pSource
5262
5257
changeDoc pdoc [TextDocumentContentChangeEvent Nothing Nothing $ pSource <> " \n foo = y :: Bool" ]
0 commit comments