From 5aa4c9133232134f0f426ef3defd7374504c92db Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 21 Oct 2016 14:47:22 -0700 Subject: [PATCH] stack/cabal cleanups; drop GHC 7.6, 7.8 support A (disabled) stack build plan for GHC 7.8 is included; supporting it would need small code changes and a maintainer. --- cabal-install.sh | 28 ++++++++++++++++------------ hledger-lib/hledger-lib.cabal | 2 +- hledger-lib/package.yaml | 2 +- hledger-ui/hledger-ui.cabal | 2 +- hledger-ui/package.yaml | 2 +- hledger-web/hledger-web.cabal | 2 +- hledger-web/package.yaml | 2 +- hledger/hledger.cabal | 2 +- hledger/package.yaml | 2 +- stack-ghc7.10.yaml | 15 +++++++++++++++ stack-ghc7.8.yaml.old | 25 +++++++++++++++++++++++++ stack-ghc7.yaml | 17 ----------------- stack-ghc8.0.yaml | 21 +++++++++++++++++++++ stack.yaml | 20 +------------------- 14 files changed, 86 insertions(+), 56 deletions(-) create mode 100644 stack-ghc7.10.yaml create mode 100644 stack-ghc7.8.yaml.old delete mode 100644 stack-ghc7.yaml create mode 100644 stack-ghc8.0.yaml mode change 100644 => 120000 stack.yaml diff --git a/cabal-install.sh b/cabal-install.sh index d00e23966..85004e5d2 100755 --- a/cabal-install.sh +++ b/cabal-install.sh @@ -1,17 +1,21 @@ #!/usr/bin/env bash -# Run this script to install all hledger packages using cabal -# (if you prefer using cabal to stack) +# Install all hledger packages using cabal (if you prefer it to stack). +# cabal.project may be a newer way. -# make a sandbox in this directory to avoid build problems +# Make a local sandbox - optional, recommended for reliable installs cabal sandbox init -# might be useful for some developers.. -cabal sandbox add-source ./hledger-lib -cabal sandbox add-source ./hledger -cabal sandbox add-source ./hledger-ui -cabal sandbox add-source ./hledger-web -cabal sandbox add-source ./hledger-api +# Tell sandbox about the local packages, recommended for developers +#cabal sandbox add-source ./hledger-lib +#cabal sandbox add-source ./hledger +#cabal sandbox add-source ./hledger-ui +#cabal sandbox add-source ./hledger-web +#cabal sandbox add-source ./hledger-api -# build and install -cabal install ./hledger-lib ./hledger ./hledger-ui ./hledger-web ./hledger-api \ - && echo "hledger executables successfully installed in ./.cabal-sandbox/bin" +# Build and install to ./cabal-sandbox-bin (or ~/.cabal/bin without a sandbox) +cabal install \ + ./hledger-lib \ + ./hledger \ + ./hledger-ui \ + ./hledger-web \ + ./hledger-api \ diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index 56a5964da..7e7809d18 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -23,7 +23,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org cabal-version: >= 1.10 build-type: Simple -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 extra-source-files: CHANGES diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 1448aebc5..1417cdd43 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -160,4 +160,4 @@ tests: dependencies: - time >=1.5 stability: stable -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 diff --git a/hledger-ui/hledger-ui.cabal b/hledger-ui/hledger-ui.cabal index f34b8d0aa..5bca0dfec 100644 --- a/hledger-ui/hledger-ui.cabal +++ b/hledger-ui/hledger-ui.cabal @@ -25,7 +25,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org cabal-version: >= 1.10 build-type: Simple -tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 extra-source-files: CHANGES diff --git a/hledger-ui/package.yaml b/hledger-ui/package.yaml index 6d550adf8..1f5896c4b 100644 --- a/hledger-ui/package.yaml +++ b/hledger-ui/package.yaml @@ -98,4 +98,4 @@ executables: dependencies: - time >= 1.5 stability : beta -tested-with : GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with : GHC==7.10.3, GHC==8.0 diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index ffd6591ef..4573e6a1a 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -25,7 +25,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org cabal-version: >= 1.10 build-type: Simple -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 extra-source-files: CHANGES diff --git a/hledger-web/package.yaml b/hledger-web/package.yaml index 5496d8723..120e0a23e 100644 --- a/hledger-web/package.yaml +++ b/hledger-web/package.yaml @@ -185,4 +185,4 @@ tests: dependencies: - ghc-prim stability: stable -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index 158cee18a..ded5270d1 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -25,7 +25,7 @@ homepage: http://hledger.org bug-reports: http://bugs.hledger.org cabal-version: >= 1.10 build-type: Simple -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 extra-source-files: bench/10000x1000x10.journal diff --git a/hledger/package.yaml b/hledger/package.yaml index 133bbea43..5e0d9eb3e 100644 --- a/hledger/package.yaml +++ b/hledger/package.yaml @@ -269,4 +269,4 @@ benchmarks: dependencies: - time >=1.5 stability: stable -tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0 +tested-with: GHC==7.10.3, GHC==8.0 diff --git a/stack-ghc7.10.yaml b/stack-ghc7.10.yaml new file mode 100644 index 000000000..b616b7c3f --- /dev/null +++ b/stack-ghc7.10.yaml @@ -0,0 +1,15 @@ +# Last-tested stack build plan using GHC 7.10.3. +# Older/newer snapshots in this series will likely work also. + +resolver: lts-6.22 + +packages: +- hledger-lib +- hledger +- hledger-ui +- hledger-web +- hledger-api + +extra-deps: +- brick-0.8 +- megaparsec-5.0.1 diff --git a/stack-ghc7.8.yaml.old b/stack-ghc7.8.yaml.old new file mode 100644 index 000000000..9b2cbbead --- /dev/null +++ b/stack-ghc7.8.yaml.old @@ -0,0 +1,25 @@ +# GHC 7.8 support has bitrotted; patches welcome. + +# stack build plan WIP: + +#resolver: lts-2.22 +# +#packages: +#- hledger-lib +##- hledger +##- hledger-ui +##- hledger-web +##- hledger-api +# +#extra-deps: +#- base-compat-0.8.1 +#- time-1.5 +#- megaparsec-5.0.1 +#- uglymemo-0.1.0.1 +#- fail-4.9.0.0 +#- semigroups-0.18.2 +#- transformers-0.4.1.0 +#- transformers-compat-0.4.0.4 +#- mtl-2.2.1 +#- mtl-compat-0.2.1.3 +##- brick-0.8 diff --git a/stack-ghc7.yaml b/stack-ghc7.yaml deleted file mode 100644 index 5a917fb0c..000000000 --- a/stack-ghc7.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Use this config if you prefer to build with GHC 7 & stackage lts-6 -# for some reason. -# $ stack --stack-yaml stack-ghc7.yaml install - -# Some older and newer lts-6 snapshots will also work here. -resolver: lts-6.22 - -packages: -- hledger-lib -- hledger -- hledger-ui -- hledger-web -- hledger-api - -extra-deps: -- brick-0.8 -- megaparsec-5.0.1 diff --git a/stack-ghc8.0.yaml b/stack-ghc8.0.yaml new file mode 100644 index 000000000..e4295b46a --- /dev/null +++ b/stack-ghc8.0.yaml @@ -0,0 +1,21 @@ +# Last-tested stack build plan using GHC 8.0. +# Older/newer snapshots in this series will likely work also. + +resolver: lts-7.4 + +packages: +- hledger-lib +- hledger +- hledger-ui +- hledger-web +- hledger-api + +extra-deps: +# for hledger-ui: +- brick-0.8 +- text-zipper-0.4 +- vty-5.7.1 +# for hledger-web: +- wai-handler-launch-3.0.2.1 + +# cf https://github.com/commercialhaskell/stack/wiki/stack.yaml diff --git a/stack.yaml b/stack.yaml deleted file mode 100644 index 150e82c0f..000000000 --- a/stack.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# some older and newer lts-7 snapshots will also work here -resolver: lts-7.4 - -packages: -- hledger-lib -- hledger -- hledger-ui -- hledger-web -- hledger-api - -extra-deps: -# for hledger-ui: -- brick-0.8 -- text-zipper-0.4 -- vty-5.7.1 -# for hledger-web: -- wai-handler-launch-3.0.2.1 - -# cf https://github.com/commercialhaskell/stack/wiki/stack.yaml diff --git a/stack.yaml b/stack.yaml new file mode 120000 index 000000000..86a0837a8 --- /dev/null +++ b/stack.yaml @@ -0,0 +1 @@ +stack-ghc8.0.yaml \ No newline at end of file