Skip to content

Commit 3be343a

Browse files
authored
Add hls-graph abstracting over shake (#1748)
* Add a new project hls-graph, shadowing Shake and reexporting it * Make hls-graph use explicit exports rather than module-level exports * Cut down on what hls-graph exports Delete unnecesssary hiding
1 parent 37622d8 commit 3be343a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+362
-57
lines changed

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ packages:
22
./
33
./hie-compat
44
./shake-bench
5+
./hls-graph
56
./ghcide
67
./hls-plugin-api
78
./hls-test-utils

ghcide/exe/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import qualified Development.IDE.Main as Main
2626
import qualified Development.IDE.Plugin.HLS.GhcIde as GhcIde
2727
import qualified Development.IDE.Plugin.Test as Test
2828
import Development.IDE.Types.Options
29-
import Development.Shake (ShakeOptions (shakeThreads))
29+
import Development.IDE.Graph (ShakeOptions (shakeThreads))
3030
import Ide.Plugin.Config (Config (checkParents, checkProject))
3131
import Ide.Plugin.ConfigUtils (pluginsToDefaultConfig,
3232
pluginsToVSCodeExtensionSchema)
@@ -109,4 +109,3 @@ main = do
109109
, optCheckProject = pure $ checkProject config
110110
}
111111
}
112-

ghcide/ghcide.cabal

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ library
7474
rope-utf16-splay,
7575
safe,
7676
safe-exceptions,
77-
shake >= 0.18.4,
77+
hls-graph,
7878
sorted-list,
7979
sqlite-simple,
8080
stm,
@@ -288,7 +288,7 @@ executable ghcide
288288
ghcide,
289289
lens,
290290
optparse-applicative,
291-
shake,
291+
hls-graph,
292292
text,
293293
unordered-containers,
294294
aeson-pretty
@@ -358,6 +358,7 @@ test-suite ghcide-tests
358358
safe,
359359
safe-exceptions,
360360
shake,
361+
hls-graph,
361362
tasty,
362363
tasty-expected-failure,
363364
tasty-hunit,
@@ -410,6 +411,7 @@ executable ghcide-bench
410411
optparse-applicative,
411412
process,
412413
safe-exceptions,
414+
hls-graph,
413415
shake,
414416
text
415417
hs-source-dirs: bench/lib bench/exe

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import Development.IDE.Types.HscEnvEq (HscEnvEq, newHscEnvEq,
5656
import Development.IDE.Types.Location
5757
import Development.IDE.Types.Logger
5858
import Development.IDE.Types.Options
59-
import Development.Shake (Action)
59+
import Development.IDE.Graph (Action)
6060
import GHC.Check
6161
import qualified HIE.Bios as HieBios
6262
import HIE.Bios.Environment hiding (getCacheDir)

ghcide/src/Development/IDE.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ import Development.IDE.Types.HscEnvEq as X (HscEnvEq (..),
5151
hscEnvWithImportPaths)
5252
import Development.IDE.Types.Location as X
5353
import Development.IDE.Types.Logger as X
54-
import Development.Shake as X (Action, RuleResult,
54+
import Development.IDE.Graph as X (Action, RuleResult,
5555
Rules, action)

ghcide/src/Development/IDE/Core/Actions.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Development.IDE.GHC.Compat hiding (TargetFile,
3030
writeHieFile)
3131
import qualified Development.IDE.Spans.AtPoint as AtPoint
3232
import Development.IDE.Types.Location
33-
import Development.Shake hiding (Diagnostic)
33+
import Development.IDE.Graph
3434
import qualified HieDb
3535
import Language.LSP.Types (DocumentHighlight (..),
3636
SymbolInformation (..))

ghcide/src/Development/IDE/Core/FileExists.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Development.IDE.Core.RuleTypes
2424
import Development.IDE.Core.Shake
2525
import Development.IDE.Types.Location
2626
import Development.IDE.Types.Options
27-
import Development.Shake
27+
import Development.IDE.Graph
2828
import Language.LSP.Server hiding (getVirtualFile)
2929
import Language.LSP.Types
3030
import Language.LSP.Types.Capabilities

ghcide/src/Development/IDE/Core/FileStore.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import Development.IDE.Import.DependencyInformation
4646
import Development.IDE.Types.Diagnostics
4747
import Development.IDE.Types.Location
4848
import Development.IDE.Types.Options
49-
import Development.Shake
49+
import Development.IDE.Graph
5050
import HieDb.Create (deleteMissingRealFiles)
5151
import Ide.Plugin.Config (CheckParents (..))
5252
import System.IO.Error

ghcide/src/Development/IDE/Core/IdeConfiguration.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Data.Hashable (Hashed, hashed, unhashed)
2121
import Data.Text (Text, isPrefixOf)
2222
import Development.IDE.Core.Shake
2323
import Development.IDE.Types.Location
24-
import Development.Shake
24+
import Development.IDE.Graph
2525
import Language.LSP.Types
2626
import System.FilePath (isRelative)
2727

ghcide/src/Development/IDE/Core/OfInterest.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import qualified Data.HashMap.Strict as HashMap
2424
import Data.Hashable
2525
import qualified Data.Text as T
2626
import Data.Typeable
27-
import Development.Shake
27+
import Development.IDE.Graph
2828
import GHC.Generics
2929

3030
import Control.Monad.Trans.Class
@@ -117,4 +117,3 @@ kick = do
117117
void $ liftIO $ modifyVar' exportsMap $ (exportsMap'' <>) . (exportsMap' <>)
118118

119119
liftIO $ progressUpdate KickCompleted
120-

0 commit comments

Comments
 (0)