Skip to content

Convert private lib in common stanza #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2020
Merged
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
62 changes: 32 additions & 30 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,39 @@ executable haskell-language-server-wrapper
, process
default-language: Haskell2010

-- This common stanza simulates a previous private lib
-- We removed it due to issues with stack when loading the project using a stack based hie.yaml
-- See https://github.com/haskell/haskell-language-server/issues/114
common hls-test-utils
import: agpl
hs-source-dirs: test/utils
other-modules: Test.Hls.Util
build-depends: base
, haskell-language-server
, haskell-lsp
, hie-bios
, aeson
, blaze-markup
, containers
, data-default
, directory
, filepath
, hslogger
, hspec
, hspec-core
, lsp-test
, stm
, tasty-hunit
, text
, unordered-containers
, yaml
ghc-options: -Wall -Wredundant-constraints
if flag(pedantic)
ghc-options: -Werror
default-language: Haskell2010

test-suite func-test
import: agpl
import: agpl, hls-test-utils
type: exitcode-stdio-1.0
default-language: Haskell2010
build-tool-depends: haskell-language-server:haskell-language-server
Expand All @@ -219,7 +250,6 @@ test-suite func-test
, haskell-language-server
, haskell-lsp
, haskell-lsp-types
, hls-test-utils
, hspec-expectations
, lens
, lsp-test >= 0.10.0.0
Expand Down Expand Up @@ -253,31 +283,3 @@ test-suite func-test
-threaded -rtsopts -with-rtsopts=-N
if flag(pedantic)
ghc-options: -Werror -Wredundant-constraints

library hls-test-utils
import: agpl
hs-source-dirs: test/utils
exposed-modules: Test.Hls.Util
build-depends: base
, haskell-language-server
, haskell-lsp
, hie-bios
, aeson
, blaze-markup
, containers
, data-default
, directory
, filepath
, hslogger
, hspec
, hspec-core
, lsp-test
, stm
, tasty-hunit
, text
, unordered-containers
, yaml
ghc-options: -Wall -Wredundant-constraints
if flag(pedantic)
ghc-options: -Werror
default-language: Haskell2010
2 changes: 1 addition & 1 deletion hie.yaml.cbl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cradle:
component: "haskell-language-server:func-test"

- path: "./test/utils/"
component: "haskell-language-server:hls-test-utils"
component: "haskell-language-server:func-test"

- path: "./exe/Main.hs"
component: "haskell-language-server:exe:haskell-language-server"
Expand Down
5 changes: 2 additions & 3 deletions hie.yaml.stack
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ cradle:
- path: "./test/functional/"
component: "haskell-language-server:func-test"

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

- path: "./exe/Main.hs"
component: "haskell-language-server:exe:haskell-language-server"
Expand Down