@@ -38,46 +38,27 @@ library
3838 build-depends :
3939 base >= 4.7 && < 5
4040 , aeson
41- , async
4241 , binary
43- , bytestring
4442 , Cabal
4543 , cabal-helper >= 1.0
4644 , containers
47- , data-default
4845 , deepseq
4946 , directory
50- , extra
5147 , filepath
52- , fuzzy
5348 , ghc
5449 , ghcide >= 0.1
5550 , gitrev
56- , haddock-library
5751 , hashable
5852 , haskell-lsp == 0.19. *
59- , haskell-lsp-types == 0.19. *
60- , hie-bios
53+ , hie-bios >= 0.4
6154 , hslogger
62- , mtl
63- , network-uri
6455 , optparse-simple
65- , prettyprinter
66- , prettyprinter-ansi-terminal
67- , prettyprinter-ansi-terminal
6856 , process
6957 , regex-tdfa >= 1.3.1.0
70- , rope-utf16-splay
71- , safe-exceptions
7258 , shake >= 0.17.5
73- , sorted-list
74- , stm
75- , syb
7659 , text
77- , time
7860 , transformers
7961 , unordered-containers
80- , utf8-string
8162 if impl(ghc >= 8.6 )
8263 build-depends : ormolu >= 0.0.3.1
8364
@@ -117,16 +98,21 @@ executable haskell-language-server
11798 base >= 4.7 && < 5
11899 , containers
119100 , data-default
120- , directory
121101 , extra
122102 , filepath
103+ --------------------------------------------------------------
104+ -- The MIN_GHC_API_VERSION macro relies on MIN_VERSION pragmas
105+ -- which require depending on ghc. So the tests need to depend
106+ -- on ghc if they need to use MIN_GHC_API_VERSION. Maybe a
107+ -- better solution can be found, but this is a quick solution
108+ -- which works for now.
123109 , ghc
110+ --------------------------------------------------------------
124111 , ghc-paths
125112 , ghcide
126113 , gitrev
127114 , haskell-lsp
128115 , hie-bios >= 0.4
129- , hslogger
130116 , haskell-language-server
131117 , optparse-applicative
132118 , shake >= 0.17.5
@@ -162,32 +148,88 @@ executable haskell-language-server-wrapper
162148 , filepath
163149 , gitrev
164150 , ghc
165- , ghcide
166151 , ghc-paths
167- , haskell-lsp
168152 , hie-bios
169153 , haskell-language-server
170154 , optparse-applicative
171155 , process
172- , text
173156 default-language : Haskell2010
174157
175158
176- test-suite test
159+ test-suite func- test
177160 type : exitcode-stdio-1.0
178- main-is : Spec.hs
161+ default-language : Haskell2010
162+ build-tool-depends : hspec-discover :hspec-discover
163+ , haskell-language-server :haskell-language-server
164+ , cabal-helper :cabal-helper-main
165+ , ghcide :ghcide-test-preprocessor
166+
167+ build-depends :
168+ base >= 4.7 && < 5
169+ , aeson
170+ , data-default
171+ , hls-test-utils
172+ , lsp-test >= 0.10.0.0
173+ , text
174+ , hspec
179175 other-modules :
180- Paths_haskell_language_server
176+ -- CompletionSpec
177+ -- , CommandSpec
178+ -- , DeferredSpec
179+ -- , DefinitionSpec
180+ -- , DiagnosticsSpec
181+ FormatSpec
182+ -- , FunctionalBadProjectSpec
183+ -- , FunctionalCodeActionsSpec
184+ -- , FunctionalLiquidSpec
185+ , FunctionalSpec
186+ -- , HaReSpec
187+ -- , HieBiosSpec
188+ -- , HighlightSpec
189+ -- , HoverSpec
190+ -- , ProgressSpec
191+ -- , ReferencesSpec
192+ -- , RenameSpec
193+ -- , SymbolsSpec
194+ -- , TypeDefinitionSpec
195+ , Utils
196+ , Paths_haskell_language_server
197+
181198 hs-source-dirs :
182- test
199+ test/functional
183200 ghc-options :
184201 -Wall
185202 -Wredundant-constraints
186203 -Wno-name-shadowing
187204 -threaded -rtsopts -with-rtsopts=-N
188205 if flag(pedantic)
189206 ghc-options : -Werror
190- build-depends :
191- base >= 4.7 && < 5
192- , haskell-language-server
193- default-language : Haskell2010
207+ main-is : Main.hs
208+ -- other-modules:
209+ -- Development.IDE.Test
210+ -- Development.IDE.Test.Runfiles
211+
212+ library hls-test-utils
213+ hs-source-dirs : test/utils
214+ exposed-modules : TestUtils
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+ , stm
229+ , text
230+ , unordered-containers
231+ , yaml
232+ ghc-options : -Wall -Wredundant-constraints
233+ if flag(pedantic)
234+ ghc-options : -Werror
235+ default-language : Haskell2010
0 commit comments