Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yesod-persistent: don't depend on persistent-template if we don't have to #1798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions yesod-persistent/yesod-persistent.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ homepage: http://www.yesodweb.com/
description: API docs and the README are available at <http://www.stackage.org/package/yesod-persistent>
extra-source-files: README.md ChangeLog.md

flag persistent_has_persistent_template
default: True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, this should have manual: False, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting ... the automatic flag selection doesn't seem to work in stack. At least that is how I interpret the CI failures. Does stack have a different default for manual than cabal-install does?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stack doesn't do dependency solving, and therefore it would need to be told to override any defaults set in the cabal file.


library
default-language: Haskell2010
build-depends: base >= 4.10 && < 5
, yesod-core >= 1.6 && < 1.7
, persistent >= 2.8
, persistent-template >= 2.1
, transformers >= 0.2.2
, blaze-builder
, conduit
Expand All @@ -28,6 +29,12 @@ library
Yesod.Persist.Core
ghc-options: -Wall

if flag(persistent_has_persistent_template)
build-depends: persistent >= 2.12.0.1
else
build-depends: persistent >= 2.8 && < 2.12.0.1
, persistent-template >= 2.1 && < 2.12.0.0

test-suite test
default-language: Haskell2010
type: exitcode-stdio-1.0
Expand Down