@@ -15,7 +15,7 @@ module Development.IDE.Types.HscEnvEq
15
15
import Control.Concurrent.Async (Async , async , waitCatch )
16
16
import Control.Concurrent.Strict (modifyVar , newVar )
17
17
import Control.DeepSeq (force )
18
- import Control.Exception (SomeException , evaluate , mask , throwIO )
18
+ import Control.Exception (evaluate , mask , throwIO )
19
19
import Control.Exception.Safe (tryAny )
20
20
import Control.Monad.Extra (eitherM , join , mapMaybeM , void )
21
21
import Data.Either (fromRight )
@@ -126,11 +126,6 @@ newHscEnvEqWithImportPaths envImportPaths se hscEnv deps = do
126
126
indexDependencyHieFiles :: IO ()
127
127
indexDependencyHieFiles = void
128
128
$ Map. traverseWithKey indexPackageHieFiles packagesWithModules
129
- logPackage :: UnitInfo -> IO ()
130
- logPackage package = Logger. logDebug (logger se) $ " !!!!!!!!!!!! hscEnvEq :\n "
131
- <> T. pack (concatMap show $ unitLibraryDirs package) <> " \n "
132
- <> T. pack (show $ unitId package)
133
- <> " \n !!!!!!!!!!!!!!!!!!!!!!"
134
129
indexPackageHieFiles :: Package -> [Module ] -> IO ()
135
130
indexPackageHieFiles (Package package) modules = do
136
131
let pkgLibDir :: FilePath
@@ -139,25 +134,17 @@ newHscEnvEqWithImportPaths envImportPaths se hscEnv deps = do
139
134
(libraryDir : _) -> libraryDir
140
135
hieDir :: FilePath
141
136
hieDir = pkgLibDir </> " extra-compilation-artifacts"
142
- logPackage package
143
137
modIfaces <- mapMaybeM loadModIFace modules
144
138
traverse_ (indexModuleHieFile hieDir) modIfaces
145
- logModule :: FilePath -> Either SomeException HieFile -> IO ()
146
- logModule hiePath hieResults = Logger. logDebug (logger se) $ " !!!!!!!!!!!! hscEnvEq :\n "
147
- <> T. pack hiePath
148
- <> (case hieResults of
149
- Left e -> " \n " <> T. pack (show e)
150
- Right _ -> " "
151
- )
152
- <> " \n !!!!!!!!!!!!!!!!!!!!!!"
153
139
indexModuleHieFile :: FilePath -> ModIface -> IO ()
154
140
indexModuleHieFile hieDir modIface = do
155
141
let hiePath :: FilePath
156
142
hiePath = hieDir </> toFilePath (moduleName $ mi_module modIface) ++ " .hie"
157
143
hieResults <- tryAny $ loadHieFile (mkUpdater $ ideNc se) hiePath
158
- logModule hiePath hieResults
159
144
case hieResults of
160
- Left _ -> return ()
145
+ Left e -> Logger. logDebug (logger se) $
146
+ " Failed to index dependency HIE file:\n "
147
+ <> T. pack (show e)
161
148
Right hie ->
162
149
indexHieFile se (toNormalizedFilePath' hiePath) (FakeFile Nothing ) (mi_src_hash modIface) hie
163
150
toFilePath :: ModuleName -> FilePath
0 commit comments