Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 0345d24

Browse files
authored
Merge pull request #885 from bubba/internal-test-lib
Use internal library for testing
2 parents b33af7a + e98a84f commit 0345d24

File tree

1 file changed

+31
-79
lines changed

1 file changed

+31
-79
lines changed

haskell-ide-engine.cabal

Lines changed: 31 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ executable hie
110110
, hie-plugin-api
111111
, hslogger
112112
, optparse-simple
113-
, stm
114113
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints
115114
-with-rtsopts=-T
116115
if flag(pedantic)
@@ -137,11 +136,33 @@ executable hie-wrapper
137136
ghc-options: -Werror
138137
default-language: Haskell2010
139138

139+
library hie-test-utils
140+
hs-source-dirs: test/utils
141+
exposed-modules: TestUtils
142+
build-depends: base
143+
, haskell-ide-engine
144+
, haskell-lsp
145+
, hie-plugin-api
146+
, aeson
147+
, containers
148+
, data-default
149+
, directory
150+
, filepath
151+
, ghc-mod-core
152+
, hslogger
153+
, hspec
154+
, stm
155+
, text
156+
, unordered-containers
157+
, yaml
158+
ghc-options: -Wall -Wredundant-constraints
159+
if flag(pedantic)
160+
ghc-options: -Werror
161+
default-language: Haskell2010
140162

141163
test-suite unit-test
142164
type: exitcode-stdio-1.0
143165
hs-source-dirs: test/unit
144-
, test/utils
145166
main-is: Main.hs
146167
other-modules: ApplyRefactPluginSpec
147168
BrittanySpec
@@ -154,8 +175,6 @@ test-suite unit-test
154175
HooglePluginSpec
155176
JsonSpec
156177
Spec
157-
158-
TestUtils
159178
build-depends: QuickCheck
160179
, aeson
161180
, base
@@ -164,25 +183,16 @@ test-suite unit-test
164183
, directory
165184
, filepath
166185
, free
167-
, haskell-lsp
168186
, haskell-ide-engine
169-
-- , hie-test-utils
187+
, haskell-lsp-types >= 0.4
188+
, hie-test-utils
170189
, hie-plugin-api
171190
, hoogle > 5.0.11
172191
, hspec
173192
, quickcheck-instances
174-
, stm
175193
, text
176194
, unordered-containers
177195

178-
-- remove these once hie-test-utils is reinstated
179-
, data-default
180-
, hie-plugin-api
181-
, ghc-mod-core
182-
, hslogger
183-
, yaml
184-
-- don't multithread i.e. --with-rtsopts=-N
185-
-- otherwise ghc-mod operations become super slow on CircleCI
186196
ghc-options: -Wall -Wredundant-constraints
187197
if flag(pedantic)
188198
ghc-options: -Werror
@@ -192,31 +202,22 @@ test-suite unit-test
192202
test-suite dispatcher-test
193203
type: exitcode-stdio-1.0
194204
hs-source-dirs: test/dispatcher
195-
test/utils
196205
main-is: Main.hs
197-
other-modules: TestUtils
198206
build-depends: base
199207
, aeson
200-
, containers
201208
, data-default
202209
, directory
203210
, filepath
204211
, ghc
205-
, haskell-lsp
206212
, haskell-ide-engine
207-
-- , hie-test-utils
213+
, haskell-lsp-types
214+
, hie-test-utils
208215
, hie-plugin-api
209216
, hspec
210217
, stm
211218
, text
212219
, unordered-containers
213220

214-
-- remove these once hie-test-utils is reinstated
215-
, hie-plugin-api
216-
, ghc-mod-core
217-
, hslogger
218-
, unordered-containers
219-
, yaml
220221
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints
221222
if flag(pedantic)
222223
ghc-options: -Werror
@@ -226,63 +227,25 @@ test-suite dispatcher-test
226227
test-suite plugin-dispatcher-test
227228
type: exitcode-stdio-1.0
228229
hs-source-dirs: test/plugin-dispatcher
229-
test/utils
230230
main-is: Main.hs
231-
other-modules: TestUtils
232231
build-depends: base
233-
, aeson
234-
, containers
235232
, data-default
236-
, directory
237-
, filepath
238-
, ghc
239-
, haskell-lsp
240233
, haskell-ide-engine
241-
-- , hie-test-utils
234+
, haskell-lsp-types
242235
, hie-plugin-api
236+
, hie-test-utils
243237
, hspec
244238
, stm
245239
, text
246-
, unordered-containers
247240

248-
-- remove these once hie-test-utils is reinstated
249-
, hie-plugin-api
250-
, ghc-mod-core
251-
, hslogger
252-
, unordered-containers
253-
, yaml
254241
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints
255242
if flag(pedantic)
256243
ghc-options: -Werror
257244
default-language: Haskell2010
258245

259-
-- library hie-test-utils
260-
-- hs-source-dirs: test/utils
261-
-- exposed-modules: TestUtils
262-
-- build-depends: base
263-
-- , haskell-ide-engine
264-
-- , haskell-lsp
265-
-- , hie-plugin-api
266-
-- , aeson
267-
-- , containers
268-
-- , data-default
269-
-- , directory
270-
-- , filepath
271-
-- , ghc-mod-core
272-
-- , hslogger
273-
-- , hspec
274-
-- , text
275-
-- , unordered-containers
276-
-- , yaml
277-
-- ghc-options: -Wall -Wredundant-constraints
278-
-- if flag(pedantic)
279-
-- ghc-options: -Werror
280-
-- default-language: Haskell2010
281-
282246
test-suite func-test
283247
type: exitcode-stdio-1.0
284248
hs-source-dirs: test/functional
285-
, test/utils
286249
main-is: Main.hs
287250
other-modules: CompletionSpec
288251
, CommandSpec
@@ -301,33 +264,22 @@ test-suite func-test
301264
, RenameSpec
302265
, SymbolsSpec
303266
, Utils
304-
305-
, TestUtils
306267
-- This cannot currently be handled by hie (cabal-helper)
307268
-- build-tool-depends: haskell-ide-engine:hie
308269
build-depends: aeson
309270
, base
310-
, containers
311271
, data-default
312272
, directory
313273
, filepath
314274
, lsp-test == 0.5.*
315275
, haskell-ide-engine
316-
-- , hie-test-utils
276+
, haskell-lsp-types >= 0.4
277+
, hie-test-utils
317278
, hie-plugin-api
318279
, hspec
319280
, lens
320-
, stm
321281
, text
322282
, unordered-containers
323-
324-
-- remove these once hie-test-utils is reinstated
325-
, hie-plugin-api
326-
, ghc-mod-core
327-
, hslogger
328-
, unordered-containers
329-
, yaml
330-
, haskell-lsp
331283
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints
332284
if flag(pedantic)
333285
ghc-options: -Werror

0 commit comments

Comments
 (0)