Skip to content

Commit c7f8ced

Browse files
authored
[merge hls-test-utils and ghcide-test-utils] part of #4173 Migrate ghcide tests to hls test utils (#4197)
* pull ghcide-bench out of ghcide and merge some of the hls-test-utils with ghcide-tests * fix style
1 parent a3e4b95 commit c7f8ced

File tree

7 files changed

+100
-113
lines changed

7 files changed

+100
-113
lines changed

cabal.project

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ packages:
44
./shake-bench
55
./hls-graph
66
./ghcide
7-
./ghcide-bench
87
./hls-plugin-api
98
./hls-test-utils
109

ghcide-bench/ghcide-bench.cabal

-108
This file was deleted.

ghcide/ghcide.cabal

-2
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,7 @@ library ghcide-test-utils
272272

273273
hs-source-dirs: test/src test/cabal
274274
exposed-modules:
275-
Development.IDE.Test
276275
Development.IDE.Test.Runfiles
277-
Development.IDE.Test.Diagnostic
278276

279277
build-depends:
280278
aeson,

haskell-language-server.cabal

+96-2
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,7 @@ benchmark benchmark
20742074
main-is: Main.hs
20752075
hs-source-dirs: bench
20762076
build-tool-depends:
2077-
ghcide-bench:ghcide-bench,
2077+
haskell-language-server:ghcide-bench,
20782078
hp2pretty:hp2pretty,
20792079
default-extensions:
20802080
LambdaCase
@@ -2089,7 +2089,7 @@ benchmark benchmark
20892089
, directory
20902090
, extra
20912091
, filepath
2092-
, ghcide-bench
2092+
, haskell-language-server:ghcide-bench-lib
20932093
, haskell-language-server
20942094
, hls-plugin-api
20952095
, lens
@@ -2199,3 +2199,97 @@ test-suite ghcide-tests
21992199
OverloadedStrings
22002200
RecordWildCards
22012201
ViewPatterns
2202+
2203+
2204+
executable ghcide-bench
2205+
default-language: GHC2021
2206+
build-depends:
2207+
aeson,
2208+
base,
2209+
bytestring,
2210+
containers,
2211+
data-default,
2212+
directory,
2213+
extra,
2214+
filepath,
2215+
hls-plugin-api,
2216+
hls-test-utils,
2217+
lens,
2218+
lsp-test,
2219+
lsp-types,
2220+
optparse-applicative,
2221+
process,
2222+
safe-exceptions,
2223+
hls-graph,
2224+
shake,
2225+
tasty-hunit >= 0.10,
2226+
text,
2227+
haskell-language-server:ghcide-bench-lib,
2228+
hs-source-dirs: ghcide-bench/exe
2229+
ghc-options: -threaded -Wall -Wno-name-shadowing -rtsopts
2230+
main-is: Main.hs
2231+
default-extensions:
2232+
LambdaCase
2233+
OverloadedStrings
2234+
RecordWildCards
2235+
ViewPatterns
2236+
2237+
library ghcide-bench-lib
2238+
default-language: GHC2021
2239+
hs-source-dirs: ghcide-bench/src
2240+
ghc-options: -Wall -Wno-name-shadowing
2241+
exposed-modules:
2242+
Experiments.Types
2243+
Experiments
2244+
build-depends:
2245+
aeson,
2246+
async,
2247+
base == 4.*,
2248+
binary,
2249+
bytestring,
2250+
deepseq,
2251+
directory,
2252+
extra,
2253+
filepath,
2254+
ghcide:{ghcide, ghcide-test-utils},
2255+
hashable,
2256+
lens,
2257+
lsp-test,
2258+
lsp-types,
2259+
optparse-applicative,
2260+
parser-combinators,
2261+
process,
2262+
safe-exceptions,
2263+
shake,
2264+
text,
2265+
hls-test-utils,
2266+
row-types
2267+
default-extensions:
2268+
LambdaCase
2269+
RecordWildCards
2270+
ViewPatterns
2271+
2272+
2273+
test-suite ghcide-bench-test
2274+
type: exitcode-stdio-1.0
2275+
default-language: GHC2021
2276+
build-tool-depends:
2277+
ghcide:ghcide,
2278+
main-is: Main.hs
2279+
hs-source-dirs: ghcide-bench/test
2280+
ghc-options: -Wunused-packages
2281+
ghc-options: -threaded -Wall
2282+
build-depends:
2283+
base,
2284+
extra,
2285+
haskell-language-server:ghcide-bench-lib,
2286+
lsp-test ^>= 0.17,
2287+
tasty,
2288+
tasty-hunit >= 0.10,
2289+
tasty-rerun,
2290+
hls-test-utils
2291+
default-extensions:
2292+
LambdaCase
2293+
OverloadedStrings
2294+
RecordWildCards
2295+
ViewPatterns

hls-test-utils/hls-test-utils.cabal

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ library
2929
Test.Hls
3030
Test.Hls.Util
3131
Test.Hls.FileSystem
32+
Development.IDE.Test
33+
Development.IDE.Test.Diagnostic
3234

3335
hs-source-dirs: src
3436
build-depends:

ghcide/test/src/Development/IDE/Test.hs renamed to hls-test-utils/src/Development/IDE/Test.hs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
{-# LANGUAGE DataKinds #-}
55
{-# LANGUAGE DuplicateRecordFields #-}
66
{-# LANGUAGE GADTs #-}
7+
{-# LANGUAGE LambdaCase #-}
8+
{-# LANGUAGE OverloadedStrings #-}
79

810
module Development.IDE.Test
911
( Cursor

0 commit comments

Comments
 (0)