Support persistent 2.12

This commit is contained in:
Michael Snoyman 2021-03-30 21:30:36 +03:00
parent f2657e7ee0
commit 42eea68fb6
No known key found for this signature in database
GPG Key ID: 907EAE2F42B52046
7 changed files with 40 additions and 5 deletions

View File

@ -21,6 +21,7 @@ jobs:
- "--resolver lts-12"
- "--resolver lts-11"
- "--stack-yaml stack-persistent-211.yaml"
- "--stack-yaml stack-persistent-212.yaml"
# Bugs in GHC make it crash too often to be worth running
exclude:
- os: windows-latest
@ -29,6 +30,8 @@ jobs:
args: "--resolver lts-16"
- os: windows-latest
args: "--stack-yaml stack-persistent-211.yaml"
- os: windows-latest
args: "--stack-yaml stack-persistent-212.yaml"
steps:
- name: Clone project

20
stack-persistent-212.yaml Normal file
View File

@ -0,0 +1,20 @@
resolver: nightly-2021-03-31
packages:
- ./yesod-core
- ./yesod-static
- ./yesod-persistent
- ./yesod-newsfeed
- ./yesod-form
- ./yesod-form-multi
- ./yesod-auth
- ./yesod-auth-oauth
- ./yesod-sitemap
- ./yesod-test
- ./yesod-bin
- ./yesod
- ./yesod-eventsource
- ./yesod-websockets
extra-deps:
- persistent-2.12.0.1
- persistent-template-2.12.0.0
- persistent-sqlite-2.12.0.0

View File

@ -1,5 +1,9 @@
# ChangeLog for yesod-auth
## 1.6.10.2
* Relax bounds for persistent 2.12
## 1.6.10.1
* Add support for Persistent 2.11 [#1701](https://github.com/yesodweb/yesod/pull/1701)

View File

@ -1,6 +1,6 @@
cabal-version: >=1.10
name: yesod-auth
version: 1.6.10.1
version: 1.6.10.2
license: MIT
license-file: LICENSE
author: Michael Snoyman, Patrick Brisbin
@ -44,7 +44,7 @@ library
, http-types
, memory
, nonce >= 1.0.2 && < 1.1
, persistent >= 2.8 && < 2.12
, persistent >= 2.8
, random >= 1.0.0.2
, safe
, shakespeare

View File

@ -1,5 +1,9 @@
# ChangeLog for yesod-persistent
## 1.6.0.2
* Add support for persistent 2.12
## 1.6.0.5
* Add support for Persistent 2.11 [#1701](https://github.com/yesodweb/yesod/pull/1701)

View File

@ -196,7 +196,11 @@ insert400 datum = do
conflict <- checkUnique datum
case conflict of
Just unique ->
#if MIN_VERSION_persistent(2, 12, 0)
badRequest' $ map (unFieldNameHS . fst) $ persistUniqueToFieldNames unique
#else
badRequest' $ map (unHaskellName . fst) $ persistUniqueToFieldNames unique
#endif
Nothing -> insert datum
-- | Same as 'insert400', but doesnt return a key.

View File

@ -1,6 +1,6 @@
cabal-version: >= 1.10
name: yesod-persistent
version: 1.6.0.5
version: 1.6.0.6
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
@ -17,8 +17,8 @@ library
default-language: Haskell2010
build-depends: base >= 4.10 && < 5
, yesod-core >= 1.6 && < 1.7
, persistent >= 2.8 && < 2.12
, persistent-template >= 2.1 && < 2.10
, persistent >= 2.8
, persistent-template >= 2.1
, transformers >= 0.2.2
, blaze-builder
, conduit