Skip to content

Commit

Permalink
Merge hls-test-utils into hls
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpj committed Feb 1, 2024
1 parent 6bedcb2 commit 7db3869
Showing 1 changed file with 72 additions and 58 deletions.
130 changes: 72 additions & 58 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ flag dynamic
default: True
manual: True

----------------------------
----------------------------
-- PLUGINS
----------------------------
----------------------------

-----------------------------
-- cabal-fmt plugin
-----------------------------
Expand Down Expand Up @@ -125,8 +131,7 @@ test-suite hls-cabal-fmt-plugin-tests
, base
, directory
, filepath
, haskell-language-server:hls-cabal-fmt-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-cabal-fmt-plugin, hls-test-utils}

if flag(isolateCabalfmtTests)
build-tool-depends: cabal-fmt:cabal-fmt ^>=0.1.6
Expand Down Expand Up @@ -202,8 +207,7 @@ test-suite hls-cabal-plugin-tests
, bytestring
, Cabal-syntax >= 3.7
, filepath
, haskell-language-server:hls-cabal-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-cabal-plugin, hls-test-utils}
, lens
, lsp
, lsp-types
Expand Down Expand Up @@ -266,8 +270,7 @@ test-suite hls-class-plugin-tests
, base
, filepath
, ghcide
, haskell-language-server:hls-class-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-class-plugin, hls-test-utils}
, lens
, lsp-types
, row-types
Expand Down Expand Up @@ -323,8 +326,7 @@ test-suite hls-call-hierarchy-plugin-tests
, containers
, extra
, filepath
, haskell-language-server:hls-call-hierarchy-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-call-hierarchy-plugin, hls-test-utils}
, ghcide:ghcide-test-utils
, lens
, lsp
Expand Down Expand Up @@ -407,9 +409,8 @@ test-suite hls-eval-plugin-tests
, containers
, extra
, filepath
, haskell-language-server:hls-eval-plugin
, haskell-language-server:{hls-eval-plugin, hls-test-utils}
, hls-plugin-api
, hls-test-utils == 2.6.0.0
, lens
, lsp-types
, text
Expand Down Expand Up @@ -462,8 +463,7 @@ test-suite hls-explicit-imports-plugin-tests
, base
, extra
, filepath
, haskell-language-server:hls-explicit-imports-plugin
, hls-test-utils
, haskell-language-server:{hls-explicit-imports-plugin, hls-test-utils}
, lens
, lsp-types
, row-types
Expand Down Expand Up @@ -521,8 +521,7 @@ test-suite hls-rename-plugin-tests
, containers
, filepath
, hls-plugin-api
, haskell-language-server:hls-rename-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-rename-plugin, hls-test-utils}

-----------------------------
-- retrie plugin
Expand Down Expand Up @@ -581,8 +580,7 @@ test-suite hls-retrie-plugin-tests
, containers
, filepath
, hls-plugin-api
, haskell-language-server:{hls-refactor-plugin, hls-retrie-plugin}
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-refactor-plugin, hls-retrie-plugin, hls-test-utils}
, text

-----------------------------
Expand Down Expand Up @@ -650,9 +648,8 @@ test-suite hls-hlint-plugin-tests
, base
, containers
, filepath
, haskell-language-server:hls-hlint-plugin
, haskell-language-server:{hls-hlint-plugin, hls-test-utils}
, hls-plugin-api
, hls-test-utils == 2.6.0.0
, lens
, lsp-types
, row-types
Expand Down Expand Up @@ -721,9 +718,8 @@ test-suite hls-stan-plugin-tests
, base
, containers
, filepath
, haskell-language-server:hls-stan-plugin
, haskell-language-server:{hls-stan-plugin, hls-test-utils}
, hls-plugin-api
, hls-test-utils == 2.6.0.0
, lens
, lsp-types
, text
Expand Down Expand Up @@ -770,8 +766,7 @@ test-suite hls-module-name-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-module-name-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-module-name-plugin, hls-test-utils}

-----------------------------
-- pragmas plugin
Expand Down Expand Up @@ -812,8 +807,7 @@ test-suite hls-pragmas-plugin-tests
, aeson
, base
, filepath
, haskell-language-server:hls-pragmas-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-pragmas-plugin, hls-test-utils}
, lens
, lsp-types
, text
Expand Down Expand Up @@ -873,8 +867,7 @@ test-suite hls-splice-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-splice-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-splice-plugin, hls-test-utils}
, text
, row-types

Expand Down Expand Up @@ -928,8 +921,7 @@ test-suite hls-alternate-number-format-plugin-tests
build-depends:
, base >=4.12 && < 5
, filepath
, haskell-language-server:hls-alternate-number-format-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-alternate-number-format-plugin, hls-test-utils}
, regex-tdfa
, tasty-quickcheck
, text
Expand Down Expand Up @@ -987,8 +979,7 @@ test-suite hls-qualify-imported-names-plugin-tests
, base
, text
, filepath
, haskell-language-server:hls-qualify-imported-names-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-qualify-imported-names-plugin, hls-test-utils}

-----------------------------
-- code range plugin
Expand Down Expand Up @@ -1039,8 +1030,7 @@ test-suite hls-code-range-plugin-tests
, base
, bytestring
, filepath
, haskell-language-server:hls-code-range-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-code-range-plugin, hls-test-utils}
, lens
, lsp
, lsp-test
Expand Down Expand Up @@ -1094,8 +1084,7 @@ test-suite hls-change-type-signature-plugin-tests
build-depends:
, base >=4.12 && < 5
, filepath
, haskell-language-server:hls-change-type-signature-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-change-type-signature-plugin, hls-test-utils}
, regex-tdfa
, text
default-extensions:
Expand Down Expand Up @@ -1150,8 +1139,7 @@ test-suite hls-gadt-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-gadt-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-gadt-plugin, hls-test-utils}
, text

-----------------------------
Expand Down Expand Up @@ -1194,8 +1182,7 @@ test-suite hls-explicit-fixity-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-explicit-fixity-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-explicit-fixity-plugin, hls-test-utils}
, text

-----------------------------
Expand Down Expand Up @@ -1241,8 +1228,7 @@ test-suite hls-explicit-record-fields-plugin-tests
, base
, filepath
, text
, haskell-language-server:hls-explicit-record-fields-plugin
, hls-test-utils
, haskell-language-server:{hls-explicit-record-fields-plugin, hls-test-utils}

-----------------------------
-- overloaded record dot plugin
Expand Down Expand Up @@ -1287,8 +1273,7 @@ test-suite hls-overloaded-record-dot-plugin-tests
, base
, filepath
, text
, haskell-language-server:hls-overloaded-record-dot-plugin
, hls-test-utils
, haskell-language-server:{hls-overloaded-record-dot-plugin, hls-test-utils}


-----------------------------
Expand Down Expand Up @@ -1327,8 +1312,7 @@ test-suite hls-floskell-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-floskell-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-floskell-plugin, hls-test-utils}

-----------------------------
-- fourmolu plugin
Expand Down Expand Up @@ -1375,9 +1359,8 @@ test-suite hls-fourmolu-plugin-tests
, base >=4.12 && <5
, aeson
, filepath
, haskell-language-server:hls-fourmolu-plugin
, haskell-language-server:{hls-fourmolu-plugin, hls-test-utils}
, hls-plugin-api
, hls-test-utils == 2.6.0.0
, lsp-test

-----------------------------
Expand Down Expand Up @@ -1424,9 +1407,8 @@ test-suite hls-ormolu-plugin-tests
, base
, aeson
, filepath
, haskell-language-server:hls-ormolu-plugin
, haskell-language-server:{hls-ormolu-plugin, hls-test-utils}
, hls-plugin-api
, hls-test-utils == 2.6.0.0
, lsp-types
, ormolu

Expand Down Expand Up @@ -1469,8 +1451,7 @@ test-suite hls-stylish-haskell-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-stylish-haskell-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-stylish-haskell-plugin, hls-test-utils}

-----------------------------
-- refactor plugin
Expand Down Expand Up @@ -1565,8 +1546,7 @@ test-suite hls-refactor-plugin-tests
build-depends:
, base
, filepath
, haskell-language-server:hls-refactor-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-refactor-plugin, hls-test-utils}
, lens
, lsp-types
, text
Expand Down Expand Up @@ -1651,8 +1631,7 @@ test-suite hls-semantic-tokens-plugin-tests
, containers
, extra
, filepath
, haskell-language-server:hls-semantic-tokens-plugin
, hls-test-utils == 2.6.0.0
, haskell-language-server:{hls-semantic-tokens-plugin, hls-test-utils}
, ghcide:ghcide-test-utils
, hls-plugin-api
, lens
Expand All @@ -1668,9 +1647,11 @@ test-suite hls-semantic-tokens-plugin-tests
, template-haskell
, data-default

-----------------------------
----------------------------
----------------------------
-- HLS
-----------------------------
----------------------------
----------------------------

library
import: defaults
Expand Down Expand Up @@ -1863,7 +1844,7 @@ test-suite func-test
, lens
, lens-aeson
, ghcide:{ghcide, ghcide-test-utils}
, hls-test-utils == 2.6.0.0
, haskell-language-server:hls-test-utils
, lsp-types
, aeson
, hls-plugin-api
Expand Down Expand Up @@ -1909,7 +1890,7 @@ test-suite wrapper-test

build-depends:
process
, hls-test-utils
, haskell-language-server:hls-test-utils

hs-source-dirs: test/wrapper
main-is: Main.hs
Expand Down Expand Up @@ -1955,3 +1936,36 @@ benchmark benchmark
shake,
shake-bench == 0.2.*,
yaml

library hls-test-utils
import: defaults, warnings, pedantic
exposed-modules:
Test.Hls
Test.Hls.Util
Test.Hls.FileSystem

hs-source-dirs: hls-test-utils/src
build-depends:
, aeson
, async
, base >=4.12 && <5
, bytestring
, containers
, data-default
, directory
, extra
, filepath
, ghcide == 2.6.0.0
, hls-plugin-api == 2.6.0.0
, lens
, lsp-test ^>=0.16
, lsp-types ^>=2.1
, tasty
, tasty-expected-failure
, tasty-golden
, tasty-hunit
, tasty-rerun
, temporary
, text
, row-types

0 comments on commit 7db3869

Please sign in to comment.