Skip to content

Commit

Permalink
Prepare Gogol for GHC 9.10 (#196)
Browse files Browse the repository at this point in the history
* Try to compile gogol for 9.8

* Bump 9.10.1

* Changes for 9.10.1

* Updated position for CI

* Use a crypton that matches both 9.6 and 9.10

* Compile for 9.10 and 9.6
  • Loading branch information
tonicebrian authored Nov 26, 2024
1 parent 081e080 commit 8d3af92
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
matrix:
versions:
- { lts: "22.27", ghc: "9.6.5" }
- { lts: "nightly-2024-11-21", ghc: "9.10.1" }

steps:
- name: Cache GHC installation
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
![CI](https://github.com/brendanhay/gogol/actions/workflows/haskell.yml/badge.svg)

# Gogol

![CI](https://github.com/brendanhay/gogol/actions/workflows/haskell.yml/badge.svg)
[![Hackage Version](https://img.shields.io/hackage/v/gogol.svg)](http://hackage.haskell.org/package/gogol)

* [Description](#description)
Expand Down
2 changes: 1 addition & 1 deletion lib/gogol-core/gogol-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ library
, aeson >=0.8
, attoparsec >=0.11.3
, base >=4.12 && <5
, base64 >=0.4
, base64 >=1.0
, bytestring >=0.9
, case-insensitive >=1.2
, conduit >=1.3
Expand Down
13 changes: 7 additions & 6 deletions lib/gogol-core/src/Gogol/Data/Base64.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Control.Lens (Iso', iso)
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base64 as Base64
import qualified Data.Base64.Types as Base64
import Data.Hashable
import qualified Data.Text.Encoding as Text
import GHC.Generics (Generic)
Expand All @@ -33,14 +34,14 @@ _Base64 :: Iso' Base64 ByteString
_Base64 = iso fromBase64 Base64

instance ToHttpApiData Base64 where
toUrlPiece = Base64.encodeBase64 . fromBase64
toQueryParam = Base64.encodeBase64 . fromBase64
toHeader = Base64.encodeBase64' . fromBase64
toUrlPiece = Base64.extractBase64 . Base64.encodeBase64 . fromBase64
toQueryParam = Base64.extractBase64 . Base64.encodeBase64 . fromBase64
toHeader = Base64.extractBase64 . Base64.encodeBase64' . fromBase64

instance FromHttpApiData Base64 where
parseUrlPiece = fmap Base64 . Base64.decodeBase64 . Text.encodeUtf8
parseQueryParam = fmap Base64 . Base64.decodeBase64 . Text.encodeUtf8
parseHeader = fmap Base64 . Base64.decodeBase64
parseUrlPiece = fmap Base64 . Base64.decodeBase64Untyped . Text.encodeUtf8
parseQueryParam = fmap Base64 . Base64.decodeBase64Untyped . Text.encodeUtf8
parseHeader = fmap Base64 . Base64.decodeBase64Untyped

instance FromJSON Base64 where
parseJSON = parseJSONText "Base64"
Expand Down
46 changes: 23 additions & 23 deletions lib/gogol/gogol.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,26 @@ library
Gogol.Prelude, Gogol.Types, Gogol.Data.Base64, Gogol.Data.JSON, Gogol.Data.Time

build-depends:
, aeson >=0.8
, base >=4.12 && <5
, bytestring >=0.9
, case-insensitive >=1.2
, conduit-extra >=1.1
, cryptonite >=0.6
, directory >=1.2
, exceptions >=0.6
, filepath >=1.2
, gogol-core ^>=1
, http-client >=0.5 && <1
, http-conduit >=2.3 && <3
, http-media >=0.6
, http-types >=0.8.6
, lens >=4.4
, memory >=0.8
, mime-types >=0.1
, mtl >=2.1.3.1
, resourcet >=1.1
, text >=1.1
, time >=1.2
, x509 >=1.5
, x509-store >=1.5
, aeson >=0.8
, base >=4.12 && <5
, bytestring >=0.9
, case-insensitive >=1.2
, conduit-extra >=1.1
, crypton >=0.34
, directory >=1.2
, exceptions >=0.6
, filepath >=1.2
, gogol-core ^>=1
, http-client >=0.5 && <1
, http-conduit >=2.3 && <3
, http-media >=0.6
, http-types >=0.8.6
, lens >=4.4
, memory >=0.8
, mime-types >=0.1
, mtl >=2.1.3.1
, resourcet >=1.1
, text >=1.1
, time >=1.2
, crypton-x509 >=1.5
, crypton-x509-store >=1.5
190 changes: 190 additions & 0 deletions stack-9.10.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
resolver: nightly-2024-11-21
compiler: ghc-9.10.1

local-bin-path: bin

nix:
enable: false
packages: [zlib, icu]
add-gc-roots: true

extra-deps:
- directory-1.3.8.5
- filepath-1.4.300.2
- process-1.6.23.0
- unix-2.8.5.1

packages:
- examples
- lib/gogol
- lib/gogol-core
# GENERATED
- lib/services/gogol-abusiveexperiencereport
- lib/services/gogol-acceleratedmobilepageurl
- lib/services/gogol-accessapproval
- lib/services/gogol-accesscontextmanager
- lib/services/gogol-adexchange-buyer
- lib/services/gogol-adexchangebuyer2
- lib/services/gogol-adexchange-seller
- lib/services/gogol-adexperiencereport
- lib/services/gogol-admin-datatransfer
- lib/services/gogol-admin-directory
- lib/services/gogol-admin-reports
- lib/services/gogol-adsense
- lib/services/gogol-adsense-host
- lib/services/gogol-alertcenter
- lib/services/gogol-analytics
- lib/services/gogol-analyticsreporting
- lib/services/gogol-androiddeviceprovisioning
- lib/services/gogol-android-enterprise
- lib/services/gogol-androidmanagement
- lib/services/gogol-android-publisher
- lib/services/gogol-appengine
- lib/services/gogol-apps-activity
- lib/services/gogol-apps-calendar
- lib/services/gogol-apps-licensing
- lib/services/gogol-apps-reseller
- lib/services/gogol-apps-tasks
- lib/services/gogol-appstate
- lib/services/gogol-bigquery
- lib/services/gogol-bigquerydatatransfer
- lib/services/gogol-bigtableadmin
- lib/services/gogol-billing
- lib/services/gogol-binaryauthorization
- lib/services/gogol-blogger
- lib/services/gogol-books
- lib/services/gogol-chat
- lib/services/gogol-civicinfo
- lib/services/gogol-classroom
- lib/services/gogol-cloudasset
- lib/services/gogol-clouderrorreporting
- lib/services/gogol-cloudfunctions
- lib/services/gogol-cloudidentity
- lib/services/gogol-cloudiot
- lib/services/gogol-cloudkms
- lib/services/gogol-cloudprivatecatalog
- lib/services/gogol-cloudprivatecatalogproducer
- lib/services/gogol-cloudprofiler
- lib/services/gogol-cloudscheduler
- lib/services/gogol-cloudsearch
- lib/services/gogol-cloudshell
- lib/services/gogol-cloudtasks
- lib/services/gogol-cloudtrace
- lib/services/gogol-commentanalyzer
- lib/services/gogol-composer
- lib/services/gogol-compute
- lib/services/gogol-consumersurveys
- lib/services/gogol-container
- lib/services/gogol-containeranalysis
- lib/services/gogol-containerbuilder
- lib/services/gogol-customsearch
- lib/services/gogol-dataflow
- lib/services/gogol-datafusion
- lib/services/gogol-dataproc
- lib/services/gogol-datastore
- lib/services/gogol-debugger
- lib/services/gogol-deploymentmanager
- lib/services/gogol-dfareporting
- lib/services/gogol-dialogflow
- lib/services/gogol-digitalassetlinks
- lib/services/gogol-discovery
- lib/services/gogol-dlp
- lib/services/gogol-dns
- lib/services/gogol-docs
- lib/services/gogol-doubleclick-bids
- lib/services/gogol-doubleclick-search
- lib/services/gogol-drive
- lib/services/gogol-driveactivity
- lib/services/gogol-factchecktools
- lib/services/gogol-file
- lib/services/gogol-firebase-dynamiclinks
- lib/services/gogol-firebasehosting
- lib/services/gogol-firebaseremoteconfig
- lib/services/gogol-firebase-rules
- lib/services/gogol-firestore
- lib/services/gogol-fitness
- lib/services/gogol-fonts
- lib/services/gogol-fusiontables
- lib/services/gogol-games
- lib/services/gogol-games-configuration
- lib/services/gogol-games-management
- lib/services/gogol-genomics
- lib/services/gogol-gmail
- lib/services/gogol-groups-migration
- lib/services/gogol-groups-settings
- lib/services/gogol-healthcare
- lib/services/gogol-iam
- lib/services/gogol-iamcredentials
- lib/services/gogol-iap
- lib/services/gogol-identity-toolkit
- lib/services/gogol-indexing
- lib/services/gogol-jobs
- lib/services/gogol-kgsearch
- lib/services/gogol-language
- lib/services/gogol-libraryagent
- lib/services/gogol-logging
- lib/services/gogol-manufacturers
- lib/services/gogol-mirror
- lib/services/gogol-ml
- lib/services/gogol-monitoring
- lib/services/gogol-oauth2
- lib/services/gogol-oslogin
- lib/services/gogol-pagespeed
- lib/services/gogol-partners
- lib/services/gogol-people
- lib/services/gogol-playcustomapp
- lib/services/gogol-play-moviespartner
- lib/services/gogol-plus
- lib/services/gogol-plus-domains
- lib/services/gogol-poly
- lib/services/gogol-proximitybeacon
- lib/services/gogol-pubsub
- lib/services/gogol-qpxexpress
- lib/services/gogol-redis
- lib/services/gogol-remotebuildexecution
- lib/services/gogol-replicapool
- lib/services/gogol-replicapool-updater
- lib/services/gogol-resourcemanager
- lib/services/gogol-run
- lib/services/gogol-runtimeconfig
- lib/services/gogol-safebrowsing
- lib/services/gogol-script
- lib/services/gogol-searchconsole
- lib/services/gogol-securitycenter
- lib/services/gogol-servicebroker
- lib/services/gogol-serviceconsumermanagement
- lib/services/gogol-servicecontrol
- lib/services/gogol-servicemanagement
- lib/services/gogol-servicenetworking
- lib/services/gogol-serviceusage
- lib/services/gogol-serviceuser
- lib/services/gogol-sheets
- lib/services/gogol-shopping-content
- lib/services/gogol-siteverification
- lib/services/gogol-slides
- lib/services/gogol-sourcerepo
- lib/services/gogol-spanner
- lib/services/gogol-spectrum
- lib/services/gogol-speech
- lib/services/gogol-sqladmin
- lib/services/gogol-storage
- lib/services/gogol-storage-transfer
- lib/services/gogol-streetviewpublish
- lib/services/gogol-surveys
- lib/services/gogol-tagmanager
- lib/services/gogol-testing
- lib/services/gogol-texttospeech
- lib/services/gogol-toolresults
- lib/services/gogol-tpu
- lib/services/gogol-tracing
- lib/services/gogol-translate
- lib/services/gogol-urlshortener
- lib/services/gogol-vault
- lib/services/gogol-videointelligence
- lib/services/gogol-vision
- lib/services/gogol-webmaster-tools
- lib/services/gogol-websecurityscanner
- lib/services/gogol-youtube
- lib/services/gogol-youtube-analytics
- lib/services/gogol-youtube-reporting
# END GENERATED
40 changes: 40 additions & 0 deletions stack-9.10.1.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: directory-1.3.8.5@sha256:fbeec9ec346e5272167f63dcb86af513b457a7b9fc36dc818e4c7b81608d612b,3166
pantry-tree:
sha256: d11130a0ca9e7c8720ed1ceef4e2f0d9be4b446e67e7d15d634763a5c952877e
size: 3519
original:
hackage: directory-1.3.8.5
- completed:
hackage: filepath-1.4.300.2@sha256:345cbb1afe414a09e47737e4d14cbd51891a734e67c0ef3d77a1439518bb81e8,5900
pantry-tree:
sha256: 2420f7addc917bf41970a8980f52abe431b1a0fb711b00795effbb289c8ea76c
size: 3998
original:
hackage: filepath-1.4.300.2
- completed:
hackage: process-1.6.23.0@sha256:684028fb5ac3d1c7657fe516f2a442d95a53ae2fcf6f6151544f3ed5289f6320,2644
pantry-tree:
sha256: b92d01efffdbd2e12a8f778909d1534defb17fe3de599930f29b73a0a56b25a5
size: 1790
original:
hackage: process-1.6.23.0
- completed:
hackage: unix-2.8.5.1@sha256:3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06,9808
pantry-tree:
sha256: b961320db69795a16c4ef4eebb0a3e7ddbbbe506fa1e22dde95ee8d8501bfbe5
size: 5821
original:
hackage: unix-2.8.5.1
snapshots:
- completed:
sha256: ddd882a4577193f6002c111fb7ad443341d21418267a14116c2139be70a73cb2
size: 679066
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/11/21.yaml
original: nightly-2024-11-21
3 changes: 2 additions & 1 deletion stack-9.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ nix:
packages: [zlib, icu]
add-gc-roots: true

extra-deps: []
extra-deps:
- base64-1.0

packages:
- examples
Expand Down
9 changes: 8 additions & 1 deletion stack-9.6.5.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
packages:
- completed:
hackage: base64-1.0@sha256:ab8084608505f30d6cf7dd790271f927fd8a00956c5e7f5546f5cf56b298022c,2991
pantry-tree:
sha256: 62150ae24db8e07f966679024406de4cdfe13556c9afce807f4f24d7ec03d0b5
size: 2229
original:
hackage: base64-1.0
snapshots:
- completed:
sha256: bc144ddf301a5c99f2cf51c7de50279ba144fd4486cb3c66f87ed761d6bbf6e9
Expand Down

0 comments on commit 8d3af92

Please sign in to comment.