From f94557bee1a25f527e91e078dc2c91f20414debf Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 21 Dec 2019 11:32:37 +0000 Subject: [PATCH 1/3] Removing ghc-mod submodule --- .gitmodules | 6 +----- submodules/ghc-mod | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 160000 submodules/ghc-mod diff --git a/.gitmodules b/.gitmodules index edbeb396b..bfbfd7b00 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,8 +14,4 @@ path = submodules/cabal-helper # url = https://github.com/DanielG/cabal-helper.git # Change this back once https://github.com/DanielG/cabal-helper/pull/85/ merged - url = https://github.com/bubba/cabal-helper.git - -[submodule "submodules/ghc-mod"] - path = submodules/ghc-mod - url = https://github.com/fendor/ghc-mod.git \ No newline at end of file + url = https://github.com/bubba/cabal-helper.git \ No newline at end of file diff --git a/submodules/ghc-mod b/submodules/ghc-mod deleted file mode 160000 index 7757a149a..000000000 --- a/submodules/ghc-mod +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7757a149a6ddb243679840ebff8949ff305c3424 From c4b014e8b24e9c115d383984fe58c576824d2e8c Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 21 Dec 2019 20:53:37 +0000 Subject: [PATCH 2/3] Remove ghc-project-types They are only used for the GHC module graph, which is currently not generated in any useful way, so not used. Closes #1486 --- cabal.project | 1 - hie-plugin-api/Haskell/Ide/Engine/Ghc.hs | 14 ++++++++++---- hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs | 11 ++--------- hie-plugin-api/hie-plugin-api.cabal | 1 - stack-8.4.2.yaml | 1 - stack-8.4.3.yaml | 1 - stack-8.4.4.yaml | 1 - stack-8.6.1.yaml | 1 - stack-8.6.2.yaml | 1 - stack-8.6.3.yaml | 1 - stack-8.6.4.yaml | 1 - stack-8.6.5.yaml | 1 - stack.yaml | 1 - 13 files changed, 12 insertions(+), 24 deletions(-) diff --git a/cabal.project b/cabal.project index 65dbe6567..6f39ccbeb 100644 --- a/cabal.project +++ b/cabal.project @@ -4,7 +4,6 @@ packages: -- ./submodules/HaRe ./submodules/cabal-helper/ - ./submodules/ghc-mod/ghc-project-types tests: true diff --git a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs index 81d9d6a63..1ec624b5c 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs @@ -11,7 +11,7 @@ module Haskell.Ide.Engine.Ghc setTypecheckedModule , Diagnostics(..) , AdditionalErrs - , cabalModuleGraphs + -- , cabalModuleGraphs , makeRevRedirMapFunc ) where @@ -22,7 +22,7 @@ import Control.Monad.IO.Class import Control.Monad ( when ) import Data.IORef import qualified Data.Map.Strict as Map -import qualified Data.IntMap.Strict as IM +-- import qualified Data.IntMap.Strict as IM import Data.Semigroup ((<>), Semigroup) import qualified Data.Set as Set import qualified Data.Text as T @@ -52,10 +52,10 @@ import qualified HIE.Bios.Ghc.Load as BIOS import System.Directory -import GhcProject.Types as GM -import GhcMake ( moduleGraphNodes ) +-- import GhcMake ( moduleGraphNodes ) import GhcMonad +-- --------------------------------------------------------------------- newtype Diagnostics = Diagnostics (Map.Map NormalizedUri (Set.Set Diagnostic)) deriving (Show, Eq) @@ -290,6 +290,11 @@ setTypecheckedModule_load uri = return $ IdeResultOk (Diagnostics diags2,errs) +{- + +-- TODO: Come up with a reasonable approach to generate a module graph +-- for a given component or package. + -- TODO: make this work for all components cabalModuleGraphs :: IdeGhcM [GM.GmModuleGraph] cabalModuleGraphs = do @@ -313,6 +318,7 @@ cabalModuleGraphs = do ] ] pure [GmModuleGraph gmg] +-} -- --------------------------------------------------------------------- diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs index a25c88c89..6e6a273d0 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs @@ -28,14 +28,8 @@ setTypecheckedModule module Haskell.Ide.Engine.PluginApi ( - -- ** Re-exported from ghc-mod via ghc-project-types - GP.GmModuleGraph(..) - , GP.ModulePath(..) - , GP.GmComponent(..) - , GP.GmComponentType(..) - -- * IDE monads - , HIE.IdeState(..) + HIE.IdeState(..) , HIE.IdeGhcM , HIE.runIdeGhcM , HIE.runActionWithContext @@ -46,7 +40,7 @@ module Haskell.Ide.Engine.PluginApi , HIE.iterT , HIE.LiftsToGhc(..) , HIE.HasGhcModuleCache(..) - , HIE.cabalModuleGraphs + -- , HIE.cabalModuleGraphs , HIE.makeRevRedirMapFunc -- * Using the HIE module cache etc @@ -72,7 +66,6 @@ module Haskell.Ide.Engine.PluginApi -import qualified GhcProject.Types as GP import qualified Haskell.Ide.Engine.Ghc as HIE import qualified Haskell.Ide.Engine.GhcModuleCache as HIE (CachedInfo(..),HasGhcModuleCache(..),emptyModuleCache) import qualified Haskell.Ide.Engine.ModuleCache as HIE (ifCachedModule,runActionWithContext ) diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index 31a218c94..7df3ad352 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -50,7 +50,6 @@ library , free , ghc , hie-bios >= 0.3.2 && < 0.4.0 - , ghc-project-types >= 5.9.0.0 , cabal-helper , haskell-lsp == 0.19.* , hslogger diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 431fa0484..3e8454872 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - brittany-0.12.1.0 - base-compat-0.9.3 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 038982002..93fbc062f 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - base-compat-0.9.3 - brittany-0.12.1.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 019f6ea08..4773450cf 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index 50319d2cb..8ccd97963 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - apply-refact-0.6.0.0 - brittany-0.12.1.0 diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index bf6c839bc..2fd3d7bef 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - brittany-0.12.1.0 - butcher-1.3.2.3 diff --git a/stack-8.6.3.yaml b/stack-8.6.3.yaml index 78bc65380..588f4aa31 100644 --- a/stack-8.6.3.yaml +++ b/stack-8.6.3.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 667ef2551..e590488b7 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - brittany-0.12.1.0 - butcher-1.3.2.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 9e572be89..4e9052e19 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - ansi-terminal-0.8.2 - ansi-wl-pprint-0.6.8.2 diff --git a/stack.yaml b/stack.yaml index 8dc95bf01..0a1737345 100644 --- a/stack.yaml +++ b/stack.yaml @@ -6,7 +6,6 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - deque-0.4.3 - ansi-terminal-0.8.2 From fde494c5d785366114ef6df5f95c7916087745f8 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 22 Dec 2019 00:19:47 +0000 Subject: [PATCH 3/3] Update .gitmodules for changes in master --- .gitmodules | 4 +--- submodules/cabal-helper | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index bfbfd7b00..ca9fce700 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,6 +12,4 @@ [submodule "submodules/cabal-helper"] path = submodules/cabal-helper - # url = https://github.com/DanielG/cabal-helper.git - # Change this back once https://github.com/DanielG/cabal-helper/pull/85/ merged - url = https://github.com/bubba/cabal-helper.git \ No newline at end of file + url = https://github.com/DanielG/cabal-helper.git diff --git a/submodules/cabal-helper b/submodules/cabal-helper index a41af4415..5b6cefdbe 160000 --- a/submodules/cabal-helper +++ b/submodules/cabal-helper @@ -1 +1 @@ -Subproject commit a41af44159ac525a913be8ece11da8583706ec1a +Subproject commit 5b6cefdbe03ebc4ec6451751fbaba72cab663766