diff --git a/cabal.project b/cabal.project index e4097d484c..eeed43c90d 100644 --- a/cabal.project +++ b/cabal.project @@ -5,7 +5,6 @@ packages: ./hls-graph ./ghcide ./ghcide-bench - ./ghcide/test ./hls-plugin-api ./hls-test-utils diff --git a/ghcide-bench/ghcide-bench.cabal b/ghcide-bench/ghcide-bench.cabal index b6794dcc4f..e6ddd1d3d4 100644 --- a/ghcide-bench/ghcide-bench.cabal +++ b/ghcide-bench/ghcide-bench.cabal @@ -67,8 +67,7 @@ library directory, extra, filepath, - ghcide, - ghcide-test-utils, + ghcide:{ghcide, ghcide-test-utils}, hashable, lens, lsp-test, diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index a4dd0ab089..5859b3ff47 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -1,4 +1,4 @@ -cabal-version: 3.0 +cabal-version: 3.4 build-type: Simple category: Development name: ghcide @@ -280,6 +280,40 @@ executable ghcide if !flag(executable) buildable: False +library ghcide-test-utils + import: warnings + visibility: public + default-language: GHC2021 + + hs-source-dirs: test/src test/cabal + exposed-modules: + Development.IDE.Test + Development.IDE.Test.Runfiles + Development.IDE.Test.Diagnostic + + build-depends: + aeson, + base > 4.9 && < 5, + containers, + data-default, + directory, + extra, + filepath, + ghcide, + lsp-types, + hls-plugin-api, + lens, + lsp-test ^>= 0.17, + tasty-hunit >= 0.10, + text, + row-types, + + default-extensions: + LambdaCase + OverloadedStrings + RecordWildCards + ViewPatterns + test-suite ghcide-tests import: warnings type: exitcode-stdio-1.0 @@ -301,6 +335,7 @@ test-suite ghcide-tests , filepath , fuzzy , ghcide + , ghcide:ghcide-test-utils , hls-plugin-api , lens , list-t @@ -330,7 +365,7 @@ test-suite ghcide-tests if impl(ghc <9.3) build-depends: ghc-typelits-knownnat - hs-source-dirs: test/cabal test/exe test/src + hs-source-dirs: test/exe ghc-options: -threaded -O0 main-is: Main.hs @@ -343,9 +378,6 @@ test-suite ghcide-tests CPPTests CradleTests DependentFileTest - Development.IDE.Test - Development.IDE.Test.Diagnostic - Development.IDE.Test.Runfiles DiagnosticTests ExceptionTests FindDefinitionAndHoverTests diff --git a/ghcide/test/ghcide-test-utils.cabal b/ghcide/test/ghcide-test-utils.cabal deleted file mode 100644 index 6b1be3f8d4..0000000000 --- a/ghcide/test/ghcide-test-utils.cabal +++ /dev/null @@ -1,50 +0,0 @@ -cabal-version: 3.0 --- This library is a copy of the sublibrary ghcide-test-utils until stack and hackage support public sublibraries -build-type: Simple -category: Development -name: ghcide-test-utils -version: 2.0.0.0 -license: Apache-2.0 -license-file: LICENSE -author: Digital Asset and Ghcide contributors -maintainer: Ghcide contributors -copyright: Digital Asset and Ghcide contributors 2018-2022 -synopsis: Test utils for ghcide -description: - Test utils for ghcide -homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme -bug-reports: https://github.com/haskell/haskell-language-server/issues -tested-with: GHC == 9.2.8 || == 9.4.8 || == 9.6.4 || == 9.8.1 - -source-repository head - type: git - location: https://github.com/haskell/haskell-language-server.git - - -library - default-language: GHC2021 - build-depends: - aeson, - base > 4.9 && < 5, - containers, - data-default, - directory, - extra, - filepath, - ghcide, - lsp-types, - hls-plugin-api, - lens, - lsp-test ^>= 0.17, - tasty-hunit >= 0.10, - text, - row-types, - hs-source-dirs: src - exposed-modules: - Development.IDE.Test - Development.IDE.Test.Diagnostic - default-extensions: - LambdaCase - OverloadedStrings - RecordWildCards - ViewPatterns diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 2813647085..de80c2a0cc 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -84,6 +84,12 @@ flag dynamic default: True manual: True +---------------------------- +---------------------------- +-- PLUGINS +---------------------------- +---------------------------- + ----------------------------- -- cabal-fmt plugin ----------------------------- @@ -326,8 +332,8 @@ test-suite hls-call-hierarchy-plugin-tests , extra , filepath , haskell-language-server:hls-call-hierarchy-plugin - , hls-test-utils == 2.6.0.0 - , ghcide-test-utils + , hls-test-utils == 2.6.0.0 + , ghcide:ghcide-test-utils , lens , lsp , lsp-test @@ -459,7 +465,7 @@ test-suite hls-explicit-imports-plugin-tests , extra , filepath , haskell-language-server:hls-explicit-imports-plugin - , hls-test-utils + , hls-test-utils == 2.6.0.0 , lens , lsp-types , row-types @@ -1194,7 +1200,7 @@ test-suite hls-explicit-record-fields-plugin-tests , filepath , text , haskell-language-server:hls-explicit-record-fields-plugin - , hls-test-utils + , hls-test-utils == 2.6.0.0 ----------------------------- -- overloaded record dot plugin @@ -1238,7 +1244,7 @@ test-suite hls-overloaded-record-dot-plugin-tests , filepath , text , haskell-language-server:hls-overloaded-record-dot-plugin - , hls-test-utils + , hls-test-utils == 2.6.0.0 ----------------------------- @@ -1511,8 +1517,7 @@ test-suite hls-refactor-plugin-tests , parser-combinators , data-default , extra - , ghcide - , ghcide-test-utils + , ghcide:{ghcide, ghcide-test-utils} , shake , hls-plugin-api , lsp-test @@ -1589,7 +1594,7 @@ test-suite hls-semantic-tokens-plugin-tests , filepath , haskell-language-server:hls-semantic-tokens-plugin , hls-test-utils == 2.6.0.0 - , ghcide-test-utils + , ghcide:ghcide-test-utils , hls-plugin-api , lens , lsp @@ -1602,9 +1607,11 @@ test-suite hls-semantic-tokens-plugin-tests , data-default , row-types ------------------------------ +---------------------------- +---------------------------- -- HLS ------------------------------ +---------------------------- +---------------------------- library import: defaults @@ -1763,8 +1770,7 @@ test-suite func-test , deepseq , extra , filepath - , ghcide - , ghcide-test-utils + , ghcide:{ghcide, ghcide-test-utils} , hashable , hls-plugin-api , hls-test-utils == 2.6.0.0 @@ -1812,7 +1818,7 @@ test-suite wrapper-test build-depends: , base >=4.16 && <5 , extra - , hls-test-utils + , hls-test-utils == 2.6.0.0 , process hs-source-dirs: test/wrapper diff --git a/stack-lts21.yaml b/stack-lts21.yaml index 6b5c0c71ab..a546cc2987 100644 --- a/stack-lts21.yaml +++ b/stack-lts21.yaml @@ -5,7 +5,6 @@ packages: - ./hie-compat - ./hls-graph - ./ghcide/ - - ./ghcide/test - ./hls-plugin-api - ./hls-test-utils # - ./shake-bench diff --git a/stack.yaml b/stack.yaml index 3eb2d809d6..8037f49e55 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,7 +5,6 @@ packages: - ./hie-compat - ./hls-graph - ./ghcide/ - - ./ghcide/test - ./hls-plugin-api - ./hls-test-utils # - ./shake-bench