Skip to content
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
53 changes: 46 additions & 7 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.20250821
#
# REGENDATA ("0.19.20250506",["--config=cabal.haskell-ci","github","cabal.project"])
# REGENDATA ("0.19.20250821",["--config=cabal.haskell-ci","github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,6 +32,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.0.20250819
compilerKind: ghc
compilerVersion: 9.14.0.20250819
setup-method: ghcup-prerelease
allow-failure: false
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.2
Expand Down Expand Up @@ -105,8 +110,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"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand All @@ -121,6 +126,21 @@ jobs:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Install GHC (GHCup prerelease)
if: matrix.setup-method == 'ghcup-prerelease'
run: |
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
Expand All @@ -131,7 +151,7 @@ jobs:
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
Expand Down Expand Up @@ -159,6 +179,18 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
if $HEADHACKAGE; then
cat >> $CABAL_CONFIG <<EOF
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
EOF
fi
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
Expand Down Expand Up @@ -211,16 +243,23 @@ jobs:
echo "packages: ${PKGDIR_github}" >> cabal.project
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "packages: ${PKGDIR_github_samples}" >> cabal.project ; fi
echo "package github" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package github" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
cat >> cabal.project <<EOF
constraints: github +openssl
constraints: github-samples +openssl
constraints: HsOpenSSL +use-pkg-config
constraints: operational -buildExamples
optimization: False
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Changes for 0.30.0.1

_2025-08-27, Andreas Abel_

- Drop dependencies `deepseq-generics` and `transformers-compat`.
- Remove obsolete `deriving Typeable`.

Tested with GHC 8.2 - 9.14 alpha1.

## Changes for 0.30

_2025-05-09, Andreas Abel, Peace edition_
Expand Down
5 changes: 5 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ haddock: >=8.6
-- See PR #355: haddocks for GADT constructor arguments only supported from GHC 8.6
jobs-selection: any

-- Package github-samples uses "include" for dependencies,
-- so they are a superset.
-- Dissecting this is a waste of time, so I turn -Werror=unused-packages off
error-unused-packages: False

-- Some dependencies do not allow mtl-2.3 yet, so this doesn't pass yet:
-- constraint-set mtl-2.3
-- ghc: >= 8.6
Expand Down
20 changes: 10 additions & 10 deletions github.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: github
version: 0.30
version: 0.30.0.1
synopsis: Access to the GitHub API, v3.
category: Network
description:
Expand Down Expand Up @@ -30,6 +30,7 @@ copyright:
Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016-2021 Oleg Grenrus

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand Down Expand Up @@ -184,17 +185,18 @@ library
autogen-modules: Paths_github

-- Packages bundles with GHC, mtl and text are also here
-- Lower bounds at least those of https://www.stackage.org/lts-10.0 (GHC 8.2.2)
build-depends:
base >=4.10 && <5
, binary >=0.7.1.0 && <0.11
, bytestring >=0.10.4.0 && <0.13
, containers >=0.5.5.1 && <1
, deepseq >=1.3.0.2 && <1.6
, binary >=0.8.5.1 && <0.11
, bytestring >=0.10.8.2 && <0.13
, containers >=0.5.10.2 && <1
, deepseq >=1.4.3.0 && <1.6
, exceptions >=0.10.2 && <0.11
, mtl >=2.1.3.1 && <2.2 || >=2.2.1 && <2.4
, text >=1.2.0.6 && <2.2
, mtl >=2.2.1 && <2.4
, text >=1.2.2.2 && <2.2
, time >=1.8.0.2 && <2
, transformers >=0.3.0.0 && <0.7
, transformers >=0.5.2.0 && <0.7

-- other packages
build-depends:
Expand All @@ -203,15 +205,13 @@ library
, base16-bytestring >=0.1.1.6 && <1.1
, binary-instances >=1 && <1.1
, cryptohash-sha1 >=0.11.100.1 && <0.12
, deepseq-generics >=0.2.0.0 && <0.3
, hashable >=1.2.7.0 && <2
, http-client >=0.5.12 && <0.8
, http-link-header >=1.0.3.1 && <1.3
, http-types >=0.12.3 && <0.13
, iso8601-time >=0.1.5 && <0.2
, network-uri >=2.6.1.0 && <2.7
, tagged >=0.8.5 && <0.9
, transformers-compat >=0.6.5 && <0.8
, unordered-containers >=0.2.10.0 && <0.3
, vector >=0.12.0.1 && <0.14

Expand Down
2 changes: 1 addition & 1 deletion samples/github-samples.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: Various samples of github package
build-type: Simple

tested-with:
GHC == 9.14.1
GHC == 9.12.2
GHC == 9.10.2
GHC == 9.8.4
Expand All @@ -28,7 +29,6 @@ library
build-depends:
, base >=4.11 && <5
-- require base-4.11 because then (<>) is in Prelude
, base-compat-batteries
, github
, text

Expand Down
6 changes: 6 additions & 0 deletions spec/GitHub/ReposSpec.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}

#if __GLASGOW_HASKELL__ >= 900
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
#endif

module GitHub.ReposSpec where

import GitHub
Expand Down
4 changes: 2 additions & 2 deletions src/GitHub/Auth.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ data Auth
| OAuth Token -- ^ OAuth token
| JWT JWTToken -- ^ JWT Token
| EnterpriseOAuth Text Token -- ^ Custom endpoint and OAuth token
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

instance NFData Auth where rnf = genericRnf
instance NFData Auth
instance Binary Auth
instance Hashable Auth

Expand Down
4 changes: 2 additions & 2 deletions src/GitHub/Data/Actions/Artifacts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data ArtifactWorkflowRun = ArtifactWorkflowRun
, artifactWorkflowRunHeadBranch :: !Text
, artifactWorkflowRunHeadSha :: !Text
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data Artifact = Artifact
{ artifactArchiveDownloadUrl :: !URL
Expand All @@ -42,7 +42,7 @@ data Artifact = Artifact
, artifactUrl :: !URL
, artifactWorkflowRun :: !ArtifactWorkflowRun
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-------------------------------------------------------------------------------
-- JSON instances
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Data/Actions/Cache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ data Cache = Cache
, cacheCreatedAt :: !UTCTime
, cacheSizeInBytes :: !Int
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data RepositoryCacheUsage = RepositoryCacheUsage
{ repositoryCacheUsageFullName :: !Text
, repositoryCacheUsageActiveCachesSizeInBytes :: !Int
, repositoryCacheUsageActiveCachesCount :: !Int
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data OrganizationCacheUsage = OrganizationCacheUsage
{ organizationCacheUsageTotalActiveCachesSizeInBytes :: !Int
, organizationCacheUsageTotalActiveCachesCount :: !Int
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-------------------------------------------------------------------------------
-- JSON instances
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Data/Actions/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data WithTotalCount a = WithTotalCount
, withTotalCountTotalCount :: !Int
-- ^ The total size of the answer.
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-- | Joining two pages of a paginated response.
-- The 'withTotalCountTotalCount' is assumed to be the same in both pages,
Expand Down
16 changes: 8 additions & 8 deletions src/GitHub/Data/Actions/Secrets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,49 +33,49 @@ data OrganizationSecret = OrganizationSecret
, organizationSecretUpdatedAt :: !UTCTime
, organizationSecretVisibility :: !Text
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data PublicKey = PublicKey
{ publicKeyId :: !Text
, publicKeyKey :: !Text
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data SetSecret = SetSecret
{ setSecretPublicKeyId :: !Text
, setSecretEncryptedValue :: !Text
, setSecretVisibility :: !Text
, setSecretSelectedRepositoryIds :: !(Maybe [Id Repo])
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data SetRepoSecret = SetRepoSecret
{ setRepoSecretPublicKeyId :: !Text
, setRepoSecretEncryptedValue :: !Text
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data SelectedRepo = SelectedRepo
{ selectedRepoRepoId :: !(Id Repo)
, selectedRepoRepoName :: !(Name Repo)
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data SetSelectedRepositories = SetSelectedRepositories
{ setSelectedRepositoriesRepositoryIds :: ![Id Repo]
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data RepoSecret = RepoSecret
{ repoSecretName :: !(Name RepoSecret)
, repoSecretCreatedAt :: !UTCTime
, repoSecretUpdatedAt :: !UTCTime
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-- TODO move somewhere else?
data Environment = Environment
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-------------------------------------------------------------------------------
-- JSON instances
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Data/Actions/WorkflowJobs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module GitHub.Data.Actions.WorkflowJobs (
import Prelude ()
import GitHub.Internal.Prelude
(Applicative ((<*>)), Data, Eq, FromJSON (parseJSON), Generic, Integer,
Ord, Show, Text, Typeable, UTCTime, Vector, withObject, ($), (.:),
Ord, Show, Text, UTCTime, Vector, withObject, ($), (.:),
(<$>))

import GitHub.Data.Id (Id)
Expand All @@ -32,7 +32,7 @@ data JobStep = JobStep
, jobStepStartedAt :: !UTCTime
, jobStepCompletedAt :: !UTCTime
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data Job = Job
{ jobId :: !(Id Job)
Expand All @@ -56,7 +56,7 @@ data Job = Job
, jobRunnerGroupId :: !Integer
, jobRunnerGroupName :: !Text
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-------------------------------------------------------------------------------
-- JSON instances
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Data/Actions/WorkflowRuns.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ data WorkflowRun = WorkflowRun
, workflowRunAttempt :: !Integer
, workflowRunStartedAt :: !UTCTime
}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data RunAttempt = RunAttempt
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

data ReviewHistory = ReviewHistory
{ reviewHistoryState :: !Text
, reviewHistoryComment :: !Text
, reviewHistoryUser :: !SimpleUser

}
deriving (Show, Data, Typeable, Eq, Ord, Generic)
deriving (Show, Data, Eq, Ord, Generic)

-------------------------------------------------------------------------------
-- JSON instances
Expand Down
Loading