Skip to content

Add support for Cabal-syntax #254

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

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
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
12 changes: 11 additions & 1 deletion example-client/example-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ flag use-network-uri
description: Are we using network-uri?
manual: False

flag Cabal-syntax
description: Are we using Cabal-syntax?
manual: False
default: False

executable example-client
main-is: Main.hs
other-modules: Prelude ExampleClient.Options

build-depends: base >= 4.5 && < 4.15,
bytestring >= 0.9,
Cabal >= 1.12,
directory >= 1.1,
filepath >= 1.2,
optparse-applicative >= 0.11,
Expand All @@ -48,3 +52,9 @@ executable example-client
network >= 2.6 && < 3.2
else
build-depends: network >= 2.5 && < 2.6

if flag(Cabal-syntax)
build-depends: Cabal-syntax >= 3.7 && < 3.9
else
build-depends: Cabal >= 1.12 && < 3.7,
Cabal-syntax < 3.7
16 changes: 13 additions & 3 deletions hackage-repo-tool/hackage-repo-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ flag use-old-time
description: Are we using @old-time@?
manual: False

flag Cabal-syntax
description: Are we using Cabal-syntax?
manual: False
Copy link
Contributor

Choose a reason for hiding this comment

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

Please specify the default. I never remember which one is a default.

default: False

executable hackage-repo-tool
hs-source-dirs: src
main-is: Main.hs
Expand All @@ -53,9 +58,6 @@ executable hackage-repo-tool
-- the respective GHC release
build-depends: base >= 4.5 && < 4.15,
bytestring >= 0.9 && < 0.12,
Cabal >= 1.14 && < 1.26
|| >= 2.0 && < 2.6
|| >= 3.0 && < 3.4,
directory >= 1.1 && < 1.4,
filepath >= 1.3 && < 1.5,
time >= 1.4 && < 1.10
Expand Down Expand Up @@ -84,6 +86,14 @@ executable hackage-repo-tool
else
build-depends: network >= 2.5 && < 2.6

if flag(Cabal-syntax)
build-depends: Cabal-syntax >= 3.7 && < 3.9
else
build-depends: Cabal >= 1.14 && < 1.26
|| >= 2.0 && < 2.6
|| >= 3.0 && < 3.7,
Cabal-syntax < 3.7


default-language: Haskell2010
default-extensions: DeriveDataTypeable
Expand Down
19 changes: 16 additions & 3 deletions hackage-security/hackage-security.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ flag use-network-uri
description: Are we using @network-uri@?
manual: False

flag Cabal-syntax
description: Are we using Cabal-syntax?
manual: False
default: False

flag old-directory
description: Use @directory@ < 1.2 and @old-time@
manual: False
Expand Down Expand Up @@ -114,9 +119,6 @@ library
base16-bytestring >= 0.1.1 && < 1.1,
base64-bytestring >= 1.0 && < 1.3,
bytestring >= 0.9 && < 0.12,
Cabal >= 1.14 && < 1.26
|| >= 2.0 && < 2.6
|| >= 3.0 && < 3.8,
containers >= 0.4 && < 0.7,
ed25519 >= 0.0 && < 0.1,
filepath >= 1.2 && < 1.5,
Expand Down Expand Up @@ -149,6 +151,14 @@ library
else
build-depends: base >= 4.10

if flag(Cabal-syntax)
build-depends: Cabal-syntax >= 3.7 && < 3.9
else
build-depends: Cabal >= 1.14 && < 1.26
|| >= 2.0 && < 2.6
|| >= 3.0 && < 3.7,
Cabal-syntax < 3.7

hs-source-dirs: src
default-language: Haskell2010
default-extensions: DefaultSignatures
Expand Down Expand Up @@ -258,6 +268,9 @@ test-suite TestSuite
time,
zlib

if flag(Cabal-syntax)
build-depends: Cabal-syntax

-- dependencies exclusive to test-suite
build-depends: tasty >= 1.2 && < 1.5,
tasty-hunit == 0.10.*,
Expand Down