diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 4bc4e0e50f..d76451a0a5 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -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 @@ -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 @@ -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 diff --git a/hie.yaml.cbl b/hie.yaml.cbl index 026d6bcbe3..b82a997749 100644 --- a/hie.yaml.cbl +++ b/hie.yaml.cbl @@ -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" diff --git a/hie.yaml.stack b/hie.yaml.stack index c0df7dc8fa..8f06c91138 100644 --- a/hie.yaml.stack +++ b/hie.yaml.stack @@ -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"