Skip to content

Commit

Permalink
Fix for metadata collect with multiple ghc vers
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Feb 22, 2018
1 parent 7e60f01 commit 95c8e46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/Collector.hs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ collectSystem prefs writeAscii forceRebuild findSources dbLists = do
knownPackages <- findKnownPackages collectorPath
libDir <- getSysLibDir Nothing VERSION_ghc
debugM "leksah-server" $ "collectSystem knownPackages= " ++ show knownPackages
packageInfos <- concat <$> forM dbLists (\dbs -> inGhcIO libDir [] [] dbs $ \ _ -> map (,dbs) <$> getInstalledPackageInfos)
packageInfos <- concat <$> forM dbLists (\dbs ->
(inGhcIO libDir [] [] dbs $ \ _ -> map (,dbs) <$> getInstalledPackageInfos)
`catch` (\(e :: SomeException) -> do
debugM "leksah-server" $ "collectSystem error " <> show e
return []))
debugM "leksah-server" $ "collectSystem packageInfos= " ++ show (map (packId . getThisPackage . fst) packageInfos)
let pkgId = packageIdentifierToString . packId . getThisPackage
newPackages = sortBy (comparing (pkgId. fst)) . nub $
Expand Down

0 comments on commit 95c8e46

Please sign in to comment.