Upgrade ghcide to incorporate the latest changes (#2879)

This commit is contained in:
Moritz Kiefer 2019-09-11 15:19:11 +02:00 committed by mergify[bot]
parent 6815304bee
commit e2c3474f1c
2 changed files with 6 additions and 5 deletions

View File

@ -673,7 +673,7 @@ hazel_custom_package_github(
strip_prefix = "wai-app-static", strip_prefix = "wai-app-static",
) )
GHCIDE_REV = "31e000e8a10ac42fe24780d9e26169e591f57581" GHCIDE_REV = "44b11667d8593ae84c48ca88e96f4f227deec096"
# We need a custom build file to depend on ghc-lib and ghc-lib-parser # We need a custom build file to depend on ghc-lib and ghc-lib-parser
hazel_custom_package_github( hazel_custom_package_github(

View File

@ -40,12 +40,13 @@ toCompileOpts options@Options{..} reportProgress =
Ghcide.IdeOptions Ghcide.IdeOptions
{ optPreprocessor = if optIsGenerated then noPreprocessor else damlPreprocessor optMbPackageName { optPreprocessor = if optIsGenerated then noPreprocessor else damlPreprocessor optMbPackageName
, optGhcSession = do , optGhcSession = do
env <- liftIO $ runGhcFast $ do env <- runGhcFast $ do
setupDamlGHC options setupDamlGHC options
GHC.getSession GHC.getSession
pkg <- liftIO $ generatePackageState optPackageDbs optHideAllPkgs $ map (second toRenaming) optPackageImports pkg <- generatePackageState optPackageDbs optHideAllPkgs $ map (second toRenaming) optPackageImports
dflags <- liftIO $ checkDFlags options $ setPackageDynFlags pkg $ hsc_dflags env dflags <- checkDFlags options $ setPackageDynFlags pkg $ hsc_dflags env
return env{hsc_dflags = dflags} hscenv <- newHscEnvEq env{hsc_dflags = dflags}
return $ const $ return hscenv
, optPkgLocationOpts = Ghcide.IdePkgLocationOptions , optPkgLocationOpts = Ghcide.IdePkgLocationOptions
{ optLocateHieFile = locateInPkgDb "hie" { optLocateHieFile = locateInPkgDb "hie"
, optLocateSrcFile = locateInPkgDb "daml" , optLocateSrcFile = locateInPkgDb "daml"