Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Remove some redundant deps for ghc-mod-core #933

Open
wants to merge 4 commits into
base: ghc802
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
packages: .
./core
../cabal-helper
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need a git copy of cabal-helper I'd just add a git-submodule to the repo.

8 changes: 1 addition & 7 deletions core/ghc-mod-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,25 @@ Library
, directory
, filepath
, mtl
, old-time
, process
, template-haskell
, time
, transformers

, base < 4.11 && >= 4.6.0.1
, djinn-ghc < 0.1 && >= 0.0.2.2
, extra < 1.7 && >= 1.4
, fclabels < 2.1 && >= 2.0
, fingertree < 0.2 && >= 0.1.1.0
, ghc-paths < 0.2 && >= 0.1.0.9
, ghc-syb-utils < 0.3 && >= 0.2.3
, haskell-src-exts < 1.20 && >= 1.18
, hlint < 3.0 && >= 2.0.8
, haskell-src-exts < 1.21 && >= 1.18
, monad-control < 1.1 && >= 1
, monad-journal < 0.9 && >= 0.4
, optparse-applicative < 0.15 && >= 0.13.0.0
, pipes < 4.4 && >= 4.1
, safe < 0.4 && >= 0.3.9
, semigroups < 0.19 && >= 0.10.0
, split < 0.3 && >= 0.2.2
, syb < 0.8 && >= 0.5.1
, temporary < 1.3 && >= 1.2.0.3
, text < 1.3 && >= 1.2.1.3
, transformers-base < 0.5 && >= 0.4.4

, cabal-helper < 0.9 && >= 0.8.0.2
Expand Down
17 changes: 8 additions & 9 deletions ghc-mod.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ Library

, base < 4.11 && >= 4.6.0.1
, djinn-ghc < 0.1 && >= 0.0.2.2
, extra < 1.6 && >= 1.4
, extra < 1.7 && >= 1.4
, fclabels < 2.1 && >= 2.0
, ghc-paths < 0.2 && >= 0.1.0.9
, ghc-syb-utils < 0.3 && >= 0.2.3
, ghc-mod-core == 5.9.0.0
, haskell-src-exts < 1.20 && >= 1.18
, hlint < 2.1 && >= 2.0.8
, haskell-src-exts < 1.21 && >= 1.18
, hlint < 2.2 && >= 2.0.8
, monad-control < 1.1 && >= 1
, monad-journal < 0.8 && >= 0.4
, optparse-applicative < 0.14 && >= 0.13.0.0
, monad-journal < 0.9 && >= 0.4
, optparse-applicative < 0.15 && >= 0.13.0.0
, pipes < 4.4 && >= 4.1
, safe < 0.4 && >= 0.3.9
, semigroups < 0.19 && >= 0.10.0
Expand All @@ -158,7 +158,6 @@ Library

, cabal-helper < 0.9 && >= 0.8.0.0
, ghc < 8.4 && >= 7.8
, ghc-mod-core

if impl(ghc >= 8.0)
Build-Depends: ghc-boot
Expand All @@ -185,7 +184,7 @@ Executable ghc-mod
, base < 4.11 && >= 4.6.0.1
, fclabels < 2.1 && >= 2.0
, monad-control < 1.1 && >= 1
, optparse-applicative < 0.14 && >= 0.13.0.0
, optparse-applicative < 0.15 && >= 0.13.0.0
, semigroups < 0.19 && >= 0.10.0
, split < 0.3 && >= 0.2.2

Expand Down Expand Up @@ -275,8 +274,8 @@ Test-Suite spec

, base < 4.11 && >= 4.6.0.1
, fclabels < 2.1 && >= 2.0
, hspec < 2.5 && >= 2.0.0
, monad-journal < 0.8 && >= 0.4
, hspec < 2.6 && >= 2.0.0
, monad-journal < 0.9 && >= 0.4
, split < 0.3 && >= 0.2.2
, temporary < 1.3 && >= 1.2.0.3

Expand Down
2 changes: 1 addition & 1 deletion test/CabalHelperSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec = do
opts <- map gmcGhcOpts <$> runD' tdir getComponents
let ghcOpts = head opts
pkgs = pkgOptions ghcOpts
pkgs `shouldBe` ["Cabal","base"]
pkgs `shouldBe` ["base","Cabal"]

test

Expand Down
6 changes: 4 additions & 2 deletions test/CheckSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ spec = do
it "works with cabal builtin preprocessors" $ do
withDirectory_ "test/data/cabal-preprocessors" $ do
_ <- system "cabal clean"
_ <- system "cabal build"
res <- runD $ checkSyntax ["Main.hs"]
-- _ <- system "cabal build"
_ <- system "cabal build -v3"
-- res <- runD $ checkSyntax ["Main.hs"]
res <- runV $ checkSyntax ["Main.hs"]
res `shouldBe` "Preprocessed.hsc:3:1:Warning: Top-level binding with no type signature: warning :: ()\n"

it "Uses the right qualification style" $ do
Expand Down
6 changes: 6 additions & 0 deletions test/TestUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module TestUtils (
run
, runD
, runD'
, runV
, runE
, runNullLog
, runGmOutDef
Expand Down Expand Up @@ -77,6 +78,11 @@ runD' :: FilePath -> GhcModT IO a -> IO a
runD' dir =
extract . runGhcModTSpec' dir (setLogLevel testLogLevel defaultOptions)

-- | Run GhcMod with default options
runV :: GhcModT IO a -> IO a
runV =
extract . runGhcModTSpec (setLogLevel GmVomit defaultOptions)

setLogLevel :: GmLogLevel -> Options -> Options
setLogLevel = set (lOoptLogLevel . lOptOutput)

Expand Down