update and fill in `message`
[lsp-test.git] / lsp-test.cabal
1 name:                lsp-test
2 version:             0.11.0.7
3 synopsis:            Functional test framework for LSP servers.
4 description:
5   A test framework for writing tests against
6   <https://microsoft.github.io/language-server-protocol/ Language Server Protocol servers>.
7   @Language.Haskell.LSP.Test@ launches your server as a subprocess and allows you to simulate a session
8   down to the wire, and @Language.Haskell.LSP.Test@ can replay captured sessions from
9   <haskell-lsp https://hackage.haskell.org/package/haskell-lsp>.
10   To see examples of it in action, check out <https://github.com/haskell/haskell-ide-engine haskell-ide-engine>,
11   <https://github.com/haskell/haskell-language-server haskell-language-server> and
12   <https://github.com/digital-asset/ghcide ghcide>.
13 homepage:            https://github.com/bubba/lsp-test#readme
14 license:             BSD3
15 license-file:        LICENSE
16 author:              Luke Lau
17 maintainer:          luke_lau@icloud.com
18 bug-reports:         https://github.com/bubba/lsp-test/issues
19 copyright:           2020 Luke Lau
20 category:            Testing
21 build-type:          Simple
22 cabal-version:       2.0
23 extra-source-files:  README.md
24                    , ChangeLog.md
25 tested-with:         GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1
26
27 source-repository head
28   type:     git
29   location: https://github.com/bubba/lsp-test/
30
31 Flag DummyServer
32   Description: Build the dummy server executable used in testing
33   Default:     False
34   Manual:      True
35
36 library
37   hs-source-dirs:      src
38   exposed-modules:     Language.Haskell.LSP.Test
39                      , Language.Haskell.LSP.Test.Replay
40   reexported-modules:  haskell-lsp:Language.Haskell.LSP.Types
41                      , haskell-lsp:Language.Haskell.LSP.Types.Capabilities
42                      , parser-combinators:Control.Applicative.Combinators
43   default-language:    Haskell2010
44   build-depends:       base >= 4.10 && < 5
45                      , haskell-lsp >= 0.22 && < 0.24
46                      , aeson
47                      , time
48                      , aeson-pretty
49                      , ansi-terminal
50                      , async
51                      , bytestring
52                      , conduit
53                      , conduit-parse == 0.2.*
54                      , containers >= 0.5.9
55                      , data-default
56                      , Diff
57                      , directory
58                      , filepath
59                      , Glob >= 0.9 && < 0.11
60                      , lens
61                      , mtl
62                      , parser-combinators >= 1.2
63                      , process >= 1.6
64                      , text
65                      , transformers
66                      , unordered-containers
67                      , some
68   if os(windows)
69     build-depends:     Win32
70   else
71     build-depends:     unix
72   other-modules:       Language.Haskell.LSP.Test.Compat
73                        Language.Haskell.LSP.Test.Decoding
74                        Language.Haskell.LSP.Test.Exceptions
75                        Language.Haskell.LSP.Test.Files
76                        Language.Haskell.LSP.Test.Parsing
77                        Language.Haskell.LSP.Test.Server
78                        Language.Haskell.LSP.Test.Session
79   ghc-options:         -W
80
81 executable dummy-server
82   main-is:             Main.hs
83   hs-source-dirs:      test/dummy-server
84   ghc-options:         -W
85   build-depends:       base >= 4.10 && < 5
86                      , haskell-lsp >= 0.23 && < 0.24
87                      , data-default
88                      , aeson
89                      , unordered-containers
90                      , directory
91                      , filepath
92   default-language:    Haskell2010
93   scope:               private
94   if !flag(DummyServer)
95     buildable:         False
96
97 test-suite tests
98   type:                exitcode-stdio-1.0
99   main-is:             Test.hs
100   hs-source-dirs:      test
101   ghc-options:         -W
102   build-depends:       base >= 4.10 && < 5
103                      , hspec
104                      , lens
105                      , haskell-lsp >= 0.22 && < 0.24
106                      , lsp-test
107                      , data-default
108                      , aeson
109                      , unordered-containers
110                      , text
111                      , directory
112                      , filepath
113   default-language:    Haskell2010
114   build-tool-depends: lsp-test:dummy-server