From 2d6bf5055bd341fad6ed48e8dd56c2e0c833fb26 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Sun, 22 Oct 2017 14:13:18 +0300 Subject: [PATCH] Improve .cabal files - Add build-tool-depends, so new-build can use hspec-discover - Add mtl bounds in tutorial (and dependency on mtl-compact) - Add extra-source-files to tutorial, so it's buildable from sdist --- doc/tutorial/tutorial.cabal | 13 ++++++++++++- servant-client-core/servant-client-core.cabal | 2 ++ servant-client/servant-client.cabal | 2 ++ servant-docs/servant-docs.cabal | 2 ++ servant-foreign/servant-foreign.cabal | 2 ++ servant-server/servant-server.cabal | 2 ++ servant/servant.cabal | 2 ++ 7 files changed, 24 insertions(+), 1 deletion(-) diff --git a/doc/tutorial/tutorial.cabal b/doc/tutorial/tutorial.cabal index 8c23a49d..ad886d01 100644 --- a/doc/tutorial/tutorial.cabal +++ b/doc/tutorial/tutorial.cabal @@ -8,6 +8,14 @@ author: Servant Contributors maintainer: haskell-servant-maintainers@googlegroups.com build-type: Simple cabal-version: >=1.10 +tested-with: + GHC==7.8.4 + GHC==7.10.3 + GHC==8.0.2 + GHC==8.2.1 +extra-source-files: + static/index.html + static/ui.js library exposed-modules: ApiType @@ -38,7 +46,8 @@ library , string-conversions , bytestring , attoparsec - , mtl + , mtl >=2.1 && <2.3 + , mtl-compat , random , js-jquery , wai @@ -57,6 +66,8 @@ test-suite spec hs-source-dirs: test main-is: Spec.hs other-modules: JavascriptSpec + build-tool-depends: + hspec-discover:hspec-discover build-depends: base == 4.* , tutorial , hspec diff --git a/servant-client-core/servant-client-core.cabal b/servant-client-core/servant-client-core.cabal index b8c52753..0cf8fb90 100644 --- a/servant-client-core/servant-client-core.cabal +++ b/servant-client-core/servant-client-core.cabal @@ -70,5 +70,7 @@ test-suite spec , servant-client-core , hspec == 2.* , QuickCheck >= 2.7 && < 2.11 + build-tool-depends: + hspec-discover:hspec-discover other-modules: Servant.Client.Core.Internal.BaseUrlSpec diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index 14ea3ad2..1e5cf91f 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -64,6 +64,8 @@ test-suite spec default-language: Haskell2010 hs-source-dirs: test main-is: Spec.hs + build-tool-depends: + hspec-discover:hspec-discover other-modules: Servant.ClientSpec build-depends: diff --git a/servant-docs/servant-docs.cabal b/servant-docs/servant-docs.cabal index 56515712..e2ea0a4e 100644 --- a/servant-docs/servant-docs.cabal +++ b/servant-docs/servant-docs.cabal @@ -75,6 +75,8 @@ test-suite spec type: exitcode-stdio-1.0 main-is: Spec.hs other-modules: Servant.DocsSpec + build-tool-depends: + hspec-discover:hspec-discover hs-source-dirs: test ghc-options: -Wall build-depends: diff --git a/servant-foreign/servant-foreign.cabal b/servant-foreign/servant-foreign.cabal index 35b41a53..32839565 100644 --- a/servant-foreign/servant-foreign.cabal +++ b/servant-foreign/servant-foreign.cabal @@ -65,6 +65,8 @@ test-suite spec include-dirs: include main-is: Spec.hs other-modules: Servant.ForeignSpec + build-tool-depends: + hspec-discover:hspec-discover build-depends: base , hspec >= 2.1.8 , servant diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index efb8f29b..8a90a73a 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -120,6 +120,8 @@ test-suite spec Servant.Server.UsingContextSpec.TestCombinators Servant.ServerSpec Servant.Utils.StaticFilesSpec + build-tool-depends: + hspec-discover:hspec-discover build-depends: base == 4.* , base-compat diff --git a/servant/servant.cabal b/servant/servant.cabal index fbd4d714..fe779840 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -118,6 +118,8 @@ test-suite spec Servant.API.ResponseHeadersSpec Servant.Utils.LinksSpec Servant.Utils.EnterSpec + build-tool-depends: + hspec-discover:hspec-discover build-depends: base == 4.* , base-compat