Skip to content

Commit 0dfb410

Browse files
authored
Merge pull request #136 from jneira/lib-to-common
Convert private lib in common stanza: * To workaround the issues involving the stack based cradle: #114 and #121 * Build info of the previous private lib has not been changed, in the hope we will restore it
2 parents a55e371 + 67f4a75 commit 0dfb410

File tree

3 files changed

+35
-34
lines changed

3 files changed

+35
-34
lines changed

haskell-language-server.cabal

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,39 @@ executable haskell-language-server-wrapper
205205
, process
206206
default-language: Haskell2010
207207

208+
-- This common stanza simulates a previous private lib
209+
-- We removed it due to issues with stack when loading the project using a stack based hie.yaml
210+
-- See https://github.com/haskell/haskell-language-server/issues/114
211+
common hls-test-utils
212+
import: agpl
213+
hs-source-dirs: test/utils
214+
other-modules: Test.Hls.Util
215+
build-depends: base
216+
, haskell-language-server
217+
, haskell-lsp
218+
, hie-bios
219+
, aeson
220+
, blaze-markup
221+
, containers
222+
, data-default
223+
, directory
224+
, filepath
225+
, hslogger
226+
, hspec
227+
, hspec-core
228+
, lsp-test
229+
, stm
230+
, tasty-hunit
231+
, text
232+
, unordered-containers
233+
, yaml
234+
ghc-options: -Wall -Wredundant-constraints
235+
if flag(pedantic)
236+
ghc-options: -Werror
237+
default-language: Haskell2010
238+
208239
test-suite func-test
209-
import: agpl
240+
import: agpl, hls-test-utils
210241
type: exitcode-stdio-1.0
211242
default-language: Haskell2010
212243
build-tool-depends: haskell-language-server:haskell-language-server
@@ -219,7 +250,6 @@ test-suite func-test
219250
, haskell-language-server
220251
, haskell-lsp
221252
, haskell-lsp-types
222-
, hls-test-utils
223253
, hspec-expectations
224254
, lens
225255
, lsp-test >= 0.10.0.0
@@ -253,31 +283,3 @@ test-suite func-test
253283
-threaded -rtsopts -with-rtsopts=-N
254284
if flag(pedantic)
255285
ghc-options: -Werror -Wredundant-constraints
256-
257-
library hls-test-utils
258-
import: agpl
259-
hs-source-dirs: test/utils
260-
exposed-modules: Test.Hls.Util
261-
build-depends: base
262-
, haskell-language-server
263-
, haskell-lsp
264-
, hie-bios
265-
, aeson
266-
, blaze-markup
267-
, containers
268-
, data-default
269-
, directory
270-
, filepath
271-
, hslogger
272-
, hspec
273-
, hspec-core
274-
, lsp-test
275-
, stm
276-
, tasty-hunit
277-
, text
278-
, unordered-containers
279-
, yaml
280-
ghc-options: -Wall -Wredundant-constraints
281-
if flag(pedantic)
282-
ghc-options: -Werror
283-
default-language: Haskell2010

hie.yaml.cbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cradle:
88
component: "haskell-language-server:func-test"
99

1010
- path: "./test/utils/"
11-
component: "haskell-language-server:hls-test-utils"
11+
component: "haskell-language-server:func-test"
1212

1313
- path: "./exe/Main.hs"
1414
component: "haskell-language-server:exe:haskell-language-server"

hie.yaml.stack

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ cradle:
66
- path: "./test/functional/"
77
component: "haskell-language-server:func-test"
88

9-
# This target does not currently work (stack 2.1.3)
10-
# - path: "./test/utils"
11-
# component: "haskell-language-server:lib:hls-test-utils"
9+
- path: "./test/utils/"
10+
component: "haskell-language-server:func-test"
1211

1312
- path: "./exe/Main.hs"
1413
component: "haskell-language-server:exe:haskell-language-server"

0 commit comments

Comments
 (0)