Hello community,

here is the log from the commit of package ghc-esqueleto for openSUSE:Factory 
checked in at 2016-10-20 23:08:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-esqueleto (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-esqueleto.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-esqueleto"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-esqueleto/ghc-esqueleto.changes      
2016-07-20 09:20:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-esqueleto.new/ghc-esqueleto.changes 
2016-10-20 23:08:15.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Sep 21 16:35:47 UTC 2016 - [email protected]
+
+- Add 0001-Port-to-Stackage-Nightly-and-persistent-2.6.patch and
+  0002-Fix-warnings-for-persistent-2.6.patch to add support for
+  persistent library versions 2.5 or newer. These patches come from
+  https://github.com/prowdsponsor/esqueleto/pull/149 and not yet
+  available officially. We decided to apply them because this
+  package is essential for git-annex.
+
+-------------------------------------------------------------------

Old:
----
  1.cabal

New:
----
  0001-Port-to-Stackage-Nightly-and-persistent-2.6.patch
  0002-Fix-warnings-for-persistent-2.6.patch
  esqueleto.cabal

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-esqueleto.spec ++++++
--- /var/tmp/diff_new_pack.iUkulc/_old  2016-10-20 23:08:16.000000000 +0200
+++ /var/tmp/diff_new_pack.iUkulc/_new  2016-10-20 23:08:16.000000000 +0200
@@ -23,12 +23,14 @@
 Release:        0
 Summary:        Type-safe EDSL for SQL queries on persistent backends
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal
+Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
+# https://github.com/prowdsponsor/esqueleto/pull/149
+Patch1:         0001-Port-to-Stackage-Nightly-and-persistent-2.6.patch
+Patch2:         0002-Fix-warnings-for-persistent-2.6.patch
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-blaze-html-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-conduit-devel
@@ -50,7 +52,6 @@
 BuildRequires:  ghc-persistent-sqlite-devel
 BuildRequires:  ghc-persistent-template-devel
 %endif
-# End cabal-rpm deps
 
 %description
 'esqueleto' is a bare bones, type-safe EDSL for SQL queries that works with
@@ -93,21 +94,17 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 cp -p %{SOURCE1} %{pkg_name}.cabal
-
+%patch1 -p1
+%patch2 -p1
 
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache

++++++ 0001-Port-to-Stackage-Nightly-and-persistent-2.6.patch ++++++
>From 5470f424f4f7d31889aded7d36667629f2e01530 Mon Sep 17 00:00:00 2001
From: Echo Nolan <[email protected]>
Date: Thu, 1 Sep 2016 13:07:12 -0700
Subject: [PATCH 1/2] Port to Stackage Nightly and persistent-2.6

---
 esqueleto.cabal                                     | 2 +-
 src/Database/Esqueleto.hs                           | 6 +++---
 src/Database/Esqueleto/Internal/PersistentImport.hs | 2 +-
 test/Test.hs                                        | 7 +++----
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/esqueleto.cabal b/esqueleto.cabal
index d861836..dc75dfd 100644
--- a/esqueleto.cabal
+++ b/esqueleto.cabal
@@ -67,7 +67,7 @@ library
       base                 >= 4.5     && < 4.10
     , bytestring
     , text                 >= 0.11    && < 1.3
-    , persistent           >= 2.1.1.7 && < 2.3
+    , persistent           >= 2.6     && < 2.7
     , transformers         >= 0.2
     , unordered-containers >= 0.2
     , tagged               >= 0.2
diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
index eb135c2..d9ab78a 100644
--- a/src/Database/Esqueleto.hs
+++ b/src/Database/Esqueleto.hs
@@ -430,8 +430,8 @@ valJ = val . unValue
 
 -- | Synonym for 'Database.Persist.Store.delete' that does not
 -- clash with @esqueleto@'s 'delete'.
-deleteKey :: ( PersistStore (PersistEntityBackend val)
+deleteKey :: ( PersistStoreWrite b
              , MonadIO m
-             , PersistEntity val )
-          => Key val -> ReaderT (PersistEntityBackend val) m ()
+             , PersistRecordBackend val b)
+          => Key val -> ReaderT b m ()
 deleteKey = Database.Persist.delete
diff --git a/src/Database/Esqueleto/Internal/PersistentImport.hs 
b/src/Database/Esqueleto/Internal/PersistentImport.hs
index ad193e0..979668c 100644
--- a/src/Database/Esqueleto/Internal/PersistentImport.hs
+++ b/src/Database/Esqueleto/Internal/PersistentImport.hs
@@ -5,7 +5,7 @@ module Database.Esqueleto.Internal.PersistentImport
   ) where
 
 import Database.Persist.Sql hiding
-  ( BackendSpecificFilter, Filter(..), PersistQuery(..), SelectOpt(..)
+  ( BackendSpecificFilter, Filter(..), PersistQueryRead(..), SelectOpt(..)
   , Update(..), delete, deleteWhereCount, updateWhereCount, selectList
   , selectKeysList, deleteCascadeWhere, (=.), (+=.), (-=.), (*=.), (/=.)
   , (==.), (!=.), (<.), (>.), (<=.), (>=.), (<-.), (/<-.), (||.)
diff --git a/test/Test.hs b/test/Test.hs
index 80c6784..48650b3 100644
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -1395,11 +1395,10 @@ main = do
 ----------------------------------------------------------------------
 
 
-insert' :: ( Functor m
-           , PersistStore (PersistEntityBackend val)
+insert' :: ( PersistStoreWrite b
            , MonadIO m
-           , PersistEntity val )
-        => val -> ReaderT (PersistEntityBackend val) m (Entity val)
+           , PersistRecordBackend val b)
+        => val -> ReaderT b m (Entity val)
 insert' v = flip Entity v <$> insert v
 
 
-- 
2.10.0

++++++ 0002-Fix-warnings-for-persistent-2.6.patch ++++++
>From f19f5f1ec7feda7925880754511e316beab97979 Mon Sep 17 00:00:00 2001
From: Echo Nolan <[email protected]>
Date: Fri, 2 Sep 2016 11:53:24 -0700
Subject: [PATCH 2/2] Fix warnings for persistent-2.6

---
 esqueleto.cabal                             | 2 ++
 src/Database/Esqueleto.hs                   | 2 +-
 src/Database/Esqueleto/Internal/Language.hs | 2 +-
 src/Database/Esqueleto/Internal/Sql.hs      | 6 +++---
 test/Test.hs                                | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/esqueleto.cabal b/esqueleto.cabal
index dc75dfd..24796d0 100644
--- a/esqueleto.cabal
+++ b/esqueleto.cabal
@@ -77,6 +77,8 @@ library
     , resourcet            >= 1.1
     , blaze-html
   hs-source-dirs: src/
+  if impl(ghc >= 8.0.1)
+     ghc-options: -Wall -Wno-redundant-constraints
   ghc-options: -Wall
 
 test-suite test
diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
index d9ab78a..3744af9 100644
--- a/src/Database/Esqueleto.hs
+++ b/src/Database/Esqueleto.hs
@@ -405,7 +405,7 @@ import qualified Database.Persist
 
 -- | @valkey i = 'val' . 'toSqlKey'@
 -- (<https://github.com/prowdsponsor/esqueleto/issues/9>).
-valkey :: (Esqueleto query expr backend, ToBackendKey SqlBackend entity, 
PersistField (Key entity)) =>
+valkey :: (Esqueleto query expr backend, ToBackendKey SqlBackend entity) =>
           Int64 -> expr (Value (Key entity))
 valkey = val . toSqlKey
 
diff --git a/src/Database/Esqueleto/Internal/Language.hs 
b/src/Database/Esqueleto/Internal/Language.hs
index fbe88e2..60a6bd8 100644
--- a/src/Database/Esqueleto/Internal/Language.hs
+++ b/src/Database/Esqueleto/Internal/Language.hs
@@ -299,7 +299,7 @@ class (Functor query, Applicative query, Monad query) =>
   sub_selectDistinct :: PersistField a => query (expr (Value a)) -> expr 
(Value a)
 
   -- | Project a field of an entity.
-  (^.) :: (PersistEntity val, PersistField typ) =>
+  (^.) :: (PersistEntity val) =>
           expr (Entity val) -> EntityField val typ -> expr (Value typ)
 
   -- | Project a field of an entity that may be null.
diff --git a/src/Database/Esqueleto/Internal/Sql.hs 
b/src/Database/Esqueleto/Internal/Sql.hs
index 32db5d9..b070b81 100644
--- a/src/Database/Esqueleto/Internal/Sql.hs
+++ b/src/Database/Esqueleto/Internal/Sql.hs
@@ -421,7 +421,7 @@ instance Esqueleto SqlQuery SqlExpr SqlBackend where
   sub_select         = sub SELECT
   sub_selectDistinct = sub_select . distinct
 
-  (^.) :: forall val typ. (PersistEntity val, PersistField typ)
+  (^.) :: forall val typ. (PersistEntity val)
        => SqlExpr (Entity val) -> EntityField val typ -> SqlExpr (Value typ)
   EEntity ident ^. field
     | isComposite = ECompositeKey $ \info ->  dot info <$> compositeFields pdef
@@ -530,12 +530,12 @@ instance Esqueleto SqlQuery SqlExpr SqlBackend where
 instance ToSomeValues SqlExpr (SqlExpr (Value a)) where
   toSomeValues a = [SomeValue a]
 
-fieldName :: (PersistEntity val, PersistField typ)
+fieldName :: (PersistEntity val)
           => IdentInfo -> EntityField val typ -> TLB.Builder
 fieldName info = fromDBName info . fieldDB . persistFieldDef
 
 -- FIXME: Composite/non-id pKS not supported on set
-setAux :: (PersistEntity val, PersistField typ)
+setAux :: (PersistEntity val)
        => EntityField val typ
        -> (SqlExpr (Entity val) -> SqlExpr (Value typ))
        -> SqlExpr (Update val)
diff --git a/test/Test.hs b/test/Test.hs
index 48650b3..9d82ad5 100644
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -1460,7 +1460,7 @@ withConn :: RunDbMonad m => (SqlBackend -> R.ResourceT m 
a) -> m a
 withConn =
   R.runResourceT .
 #if defined(WITH_POSTGRESQL)
-  withPostgresqlConn "host=localhost port=5432 user=test dbname=test"
+  withPostgresqlConn "host=localhost port=5432 user=test password=test 
dbname=test"
 #elif defined (WITH_MYSQL)
   withMySQLConn defaultConnectInfo
     { connectHost     = "localhost"
-- 
2.10.0

++++++ esqueleto.cabal ++++++
name:                esqueleto
version:             2.4.3
x-revision: 1
synopsis:            Type-safe EDSL for SQL queries on persistent backends.
homepage:            https://github.com/prowdsponsor/esqueleto
license:             BSD3
license-file:        LICENSE
author:              Felipe Lessa
maintainer:          [email protected]
copyright:           (c) 2012-2015 Felipe Almeida Lessa
category:            Database
build-type:          Simple
cabal-version:       >=1.8
description:
  @esqueleto@ is a bare bones, type-safe EDSL for SQL queries
  that works with unmodified @persistent@ SQL backends.  Its
  language closely resembles SQL, so you don't have to learn
  new concepts, just new syntax, and it's fairly easy to
  predict the generated SQL and optimize it for your backend.
  Most kinds of errors committed when writing SQL are caught as
  compile-time errors---although it is possible to write
  type-checked @esqueleto@ queries that fail at runtime.
  .
  @persistent@ is a library for type-safe data serialization.  It
  has many kinds of backends, such as SQL backends
  (@persistent-mysql@, @persistent-postgresql@,
  @persistent-sqlite@) and NoSQL backends (@persistent-mongoDB@).
  While @persistent@ is a nice library for storing and retrieving
  records, including with filters, it does not try to support
  some of the features that are specific to SQL backends.  In
  particular, @esqueleto@ is the recommended library for
  type-safe @JOIN@s on @persistent@ SQL backends.  (The
  alternative is using raw SQL, but that's error prone and does
  not offer any composability.)
  .
  Currently, @SELECT@s, @UPDATE@s, @INSERT@s and @DELETE@s are supported.
  Not all SQL features are available, but most of them can be easily added
  (especially functions), so please open an issue or send a pull request if
  you need anything that is not covered by @esqueleto@ on
  <https://github.com/prowdsponsor/esqueleto/>.
  .
  The name of this library means \"skeleton\" in Portuguese and
  contains all three SQL letters in the correct order =).  It was
  inspired by Scala's Squeryl but created from scratch.

source-repository head
  type:     git
  location: git://github.com/prowdsponsor/esqueleto.git

Flag postgresql
  Description: test postgresql. default is to test sqlite.
  Default: False

Flag mysql
  Description: test MySQL/MariaDB. default is to test sqlite.
  Default: False

library
  exposed-modules:
    Database.Esqueleto
    Database.Esqueleto.PostgreSQL
    Database.Esqueleto.Internal.Language
    Database.Esqueleto.Internal.Sql
  other-modules:
    Database.Esqueleto.Internal.PersistentImport
  build-depends:
      base                 >= 4.5     && < 4.10
    , bytestring
    , text                 >= 0.11    && < 1.3
    , persistent           >= 2.1.1.7 && < 2.3
    , transformers         >= 0.2
    , unordered-containers >= 0.2
    , tagged               >= 0.2

    , monad-logger
    , conduit              >= 1.1
    , resourcet            >= 1.1
    , blaze-html
  hs-source-dirs: src/
  ghc-options: -Wall

test-suite test
  type: exitcode-stdio-1.0
  ghc-options:    -Wall
  hs-source-dirs: test
  main-is:        Test.hs
  build-depends:
      -- Library dependencies used on the tests.  No need to
      -- specify versions since they'll use the same as above.
      base, persistent, transformers, resourcet, text

      -- Test-only dependencies
    , conduit             >= 1.1
    , containers
    , HUnit
    , QuickCheck
    , hspec               >= 1.8
    , persistent-sqlite   >= 2.1
    , persistent-template >= 2.1
    , monad-control
    , monad-logger        >= 0.3

      -- This library
    , esqueleto

  if flag(postgresql)
    build-depends:
        postgresql-simple     >= 0.2
      , postgresql-libpq      >= 0.6
      , persistent-postgresql >= 2.0

    cpp-options: -DWITH_POSTGRESQL

  if flag(mysql)
    build-depends:
        mysql-simple          >= 0.2.2.3
      , mysql                 >= 0.1.1.3
      , persistent-mysql      >= 2.0

    cpp-options: -DWITH_MYSQL

Reply via email to