Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
28 changes: 19 additions & 9 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20250506
# version: 0.19.20260209
#
# REGENDATA ("0.19.20250506",["github","hackage-server.cabal"])
# REGENDATA ("0.19.20260209",["github","hackage-server.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -20,6 +20,11 @@ on:
pull_request:
branches:
- master
merge_group:
branches:
- master
workflow_dispatch:
{}
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand All @@ -32,14 +37,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.2
- compiler: ghc-9.14.1
compilerKind: ghc
compilerVersion: 9.14.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.12.4
compilerKind: ghc
compilerVersion: 9.12.2
compilerVersion: 9.12.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.2
- compiler: ghc-9.10.3
compilerKind: ghc
compilerVersion: 9.10.2
compilerVersion: 9.10.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.4
Expand All @@ -66,8 +76,8 @@ jobs:
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
Comment thread
andreasabel marked this conversation as resolved.
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand Down Expand Up @@ -168,7 +178,7 @@ jobs:
touch cabal.project.local
echo "packages: ${PKGDIR_hackage_server}" >> cabal.project
echo "package hackage-server" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|hackage-server|parsec|process|text)$/; }' >> cabal.project.local
Expand Down
3 changes: 3 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
branches: master

error-incomplete-patterns: False
error-unused-packages: False

installed: +all -Cabal -Cabal-syntax -text -parsec -process

-- Does not work with GHA:
Expand Down
21 changes: 11 additions & 10 deletions hackage-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ license: BSD-3-Clause
license-file: LICENSE

tested-with:
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.14.1
GHC == 9.12.4
GHC == 9.10.3
GHC == 9.8.4
GHC == 9.6.7
-- Constraint transformers >= 0.6 forces GHC >= 9.6 for CI
Expand Down Expand Up @@ -147,7 +148,7 @@ common defaults
-- see `cabal.project.local-ghc-${VERSION}` files
build-depends:
, array >= 0.5 && < 0.6
, base >= 4.18 && < 4.22
, base >= 4.18 && < 4.23
, binary >= 0.8 && < 0.9
, bytestring >= 0.11.2 && < 0.13
, containers >= 0.6.0 && < 0.9
Expand All @@ -158,15 +159,15 @@ common defaults
-- we use Control.Monad.Except, introduced in mtl-2.2.1
, pretty >= 1.1 && < 1.2
, text ^>= 1.2.5.0 || >= 2.0 && < 2.2
, time >= 1.9 && < 1.15
, time >= 1.9 && < 1.16
, transformers >= 0.5 && < 0.7
, unix >= 2.7 && < 2.9
, scientific
-- other dependencies shared by most components
build-depends:
, aeson >= 2.1.0.0 && < 2.3
, Cabal >= 3.14.2.0 && < 3.18
, Cabal-syntax >= 3.14.2.0 && < 3.18
, Cabal >= 3.16.0.0 && < 3.18
, Cabal-syntax >= 3.16.0.0 && < 3.18
-- Cabal-syntax needs to be bound to constrain hackage-security
-- see https://github.com/haskell/hackage-server/issues/1130
, network-bsd ^>= 2.8
Expand Down Expand Up @@ -431,11 +432,11 @@ library
-- NB: see also build-depends in `common defaults`!
build-depends:
, HStringTemplate ^>= 0.8
, HTTP ^>= 4000.3.16 || ^>= 4000.4.1
, HTTP >= 4000.3.16 && < 4000.6
, http-client ^>= 0.7 && < 0.8
, http-client-tls ^>= 0.3
, http-types >= 0.10 && < 0.13
, QuickCheck >= 2.14 && < 2.16
, QuickCheck >= 2.14 && < 2.19
, acid-state ^>= 0.16
, safecopy >= 0.6 && < 0.11
, async ^>= 2.2.1
Expand Down Expand Up @@ -639,7 +640,7 @@ test-suite ReverseDependenciesTest
, tasty-hedgehog ^>= 1.4
, tasty-hunit ^>= 0.10
, HUnit ^>= 1.6
, hedgehog >= 1.4 && < 1.6
, hedgehog >= 1.4 && < 1.8
, exceptions
, bimap
, mime-mail
Expand All @@ -654,7 +655,7 @@ benchmark RevDeps
main-is: RevDeps.hs
build-tool-depends: hackage-server:hackage-server
build-depends:
, random ^>= 1.2
, random >= 1.2
, gauge
-- gauge does not support base-4.20
if impl(ghc >= 9.10)
Expand Down
6 changes: 2 additions & 4 deletions src/Distribution/Server/Features/UserNotify/Backup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import Distribution.Server.Framework.BackupRestore

import qualified Data.Map as Map

import Data.Maybe (fromJust)
import Data.Time (defaultTimeLocale)
import Data.Time.Format.Internal (buildTime)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Distribution.Text (display)
import Text.CSV (CSV, Record)

Expand All @@ -38,7 +36,7 @@ userNotifyBackup = go []
_ -> return (go st)

, restoreFinalize =
return (Acid.NotifyData (Map.fromList st, fromJust (buildTime defaultTimeLocale []))) -- defaults to unixstart time
return (Acid.NotifyData (Map.fromList st, posixSecondsToUTCTime 0)) -- unixstart time
}

importNotifyPref :: CSV -> Restore [(UserId, Acid.NotifyPref)]
Expand Down
Loading