Skip to content

Commit fdb09cc

Browse files
committed
More thorough install-all.sh checking
1 parent 2fb758a commit fdb09cc

11 files changed

Lines changed: 52 additions & 15 deletions

File tree

install-all.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash -x
22

33
CABAL=cabal
44

@@ -16,7 +16,7 @@ PACKAGES="persistent-template persistent-sqlite persistent-postgresql persistent
1616
cabal_install() {
1717
if [ "$2" == "" ]
1818
then
19-
configure_opts="--enable-tests"
19+
configure_opts="--enable-tests --ghc-options=-Wall --ghc-options=-Werror"
2020
test="$CABAL test"
2121
else
2222
configure_opts=$2
@@ -26,7 +26,7 @@ cabal_install() {
2626
cd $1
2727
($CABAL configure $configure_opts ||
2828
($CABAL install --only-dependencies && $CABAL configure $configure_opts)
29-
) && $CABAL build && $test && ./Setup.lhs install || exit 1
29+
) && $CABAL build && $test && $CABAL check && $CABAL haddock --executables && ./Setup.lhs install || exit 1
3030
cd ..
3131
}
3232

persistent-mongoDB/persistent-mongoDB.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ stability: Experimental
1010
cabal-version: >= 1.6
1111
build-type: Simple
1212
homepage: http://www.yesodweb.com/book/persistent
13+
description: Backend for the persistent library using mongoDB.
1314

1415
library
1516
build-depends: base >= 4 && < 5

persistent-template/Database/Persist/TH.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,15 @@ module Database.Persist.TH
1919
import Database.Persist.Base
2020
import Database.Persist.GenericSql (Migration, SqlPersist, migrate)
2121
import Database.Persist.Quasi (parse)
22-
import Database.Persist.Util (deprecate, nullable)
22+
import Database.Persist.Util (nullable)
2323
import Database.Persist.TH.Library (apE)
2424
import Language.Haskell.TH.Quote
2525
import Language.Haskell.TH.Syntax
2626
import Data.Char (toLower, toUpper)
27-
import Data.Maybe (mapMaybe, catMaybes)
2827
import Control.Monad (forM)
2928
import Control.Monad.IO.Control (MonadControlIO)
3029
import qualified System.IO as SIO
3130
import Data.Text (pack)
32-
import qualified Data.Text.Read
33-
import qualified Data.Text as T
3431
import Data.List (isSuffixOf)
3532

3633
-- | Converts a quasi-quoted syntax into a list of entity definitions, to be
@@ -454,6 +451,7 @@ instance Lift PersistFilter where
454451
lift Le = [|Le|]
455452
lift In = [|In|]
456453
lift NotIn = [|NotIn|]
454+
lift (BackendSpecificFilter x) = [|BackendSpecificFilter $(lift x)|]
457455

458456
instance Lift PersistUpdate where
459457
lift Assign = [|Assign|]

persistent-template/LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
The following license covers this documentation, and the source code, except
2+
where otherwise indicated.
3+
4+
Copyright 2010, Michael Snoyman. All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
17+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19+
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
20+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

persistent-template/persistent-template.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: persistent-template
22
version: 0.6.0
33
license: BSD3
4+
license-file: LICENSE
45
author: Michael Snoyman <michael@snoyman.com>
56
maintainer: Michael Snoyman <michael@snoyman.com>
67
synopsis: Type-safe, non-relational, multi-backend persistence.

persistent/persistent-mongoDB

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../persistent-mongoDB/

persistent/persistent-postgresql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../persistent-postgresql/

persistent/persistent-sqlite

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../persistent-sqlite/

persistent/persistent-template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../persistent-template/

persistent/persistent.cabal

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ synopsis: Type-safe, non-relational, multi-backend persistence.
88
description: This library provides just the general interface and helper functions. You must use a specific backend in order to make this useful.
99
category: Database, Yesod
1010
stability: Stable
11-
cabal-version: >= 1.6
11+
cabal-version: >= 1.8
1212
build-type: Simple
1313
homepage: http://www.yesodweb.com/book/persistent
1414

@@ -40,8 +40,8 @@ library
4040

4141
test-suite test
4242
type: exitcode-stdio-1.0
43-
main-is: test/main.hs
44-
hs-source-dirs: ., ../persistent-template, ../persistent-sqlite, ../persistent-postgresql ../persistent-mongoDB
43+
main-is: main.hs
44+
hs-source-dirs: test, persistent-template, persistent-sqlite, persistent-postgresql, persistent-mongoDB
4545

4646
build-depends: HUnit
4747
, hspec >= 0.6.1 && < 0.7
@@ -56,6 +56,13 @@ test-suite test
5656
, network
5757
, compact-string-fix
5858
, bson
59+
, persistent
60+
, path-pieces
61+
, text
62+
, transformers
63+
, monad-control
64+
, containers
65+
, bytestring
5966

6067
-- these are mutually exclusive options
6168
-- cpp-options: -DWITH_POSTGRESQL

0 commit comments

Comments
 (0)