From ccfaedb7ad75adb20b19d462a41027f62cb19353 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 13 Oct 2021 19:47:14 +0200 Subject: [PATCH] Migrate to aeson-2.0.1.0 --- cabal.project | 15 ++++++++++++++- ghcup.cabal | 4 ++-- lib/GHCup/Types/JSON.hs | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/cabal.project b/cabal.project index 2855c1c..1ea8800 100644 --- a/cabal.project +++ b/cabal.project @@ -9,8 +9,18 @@ package ghcup flags: +tui constraints: http-io-streams -brotli, - any.Cabal ==3.4.0.0 || ==3.6.2.0 + any.Cabal ==3.4.0.0 || ==3.6.2.0, + any.aeson >= 2.0.1.0 +source-repository-package + type: git + location: https://github.com/hasufell/aeson-pretty.git + tag: e902ab866bb41d990b66af3644aeb352ff7aaf6f + +source-repository-package + type: git + location: https://github.com/hasufell/HsYAML-aeson.git + tag: b4b4ab8592918b52a9f2e5bb0c5a795b9721b4f3 package libarchive flags: -system-libarchive @@ -21,4 +31,7 @@ package aeson-pretty package cabal-plan flags: -exe +package aeson + flags: +ordered-keymap + allow-newer: base, ghc-prim, template-haskell, language-c diff --git a/ghcup.cabal b/ghcup.cabal index 938d338..bdbc367 100644 --- a/ghcup.cabal +++ b/ghcup.cabal @@ -92,7 +92,7 @@ library -fwarn-incomplete-record-updates build-depends: - , aeson >=1.4 && <1.6 + , aeson >=1.4 , async >=0.8 && <2.3 , base >=4.13 && <5 , base16-bytestring >=0.1.1.6 && <1.1 @@ -189,7 +189,7 @@ executable ghcup -fwarn-incomplete-record-updates -threaded build-depends: - , aeson >=1.4 && <1.6 + , aeson >=1.4 , aeson-pretty ^>=0.8.8 , async ^>=2.2.3 , base >=4.13 && <5 diff --git a/lib/GHCup/Types/JSON.hs b/lib/GHCup/Types/JSON.hs index ab265ae..dded840 100644 --- a/lib/GHCup/Types/JSON.hs +++ b/lib/GHCup/Types/JSON.hs @@ -28,9 +28,9 @@ import GHCup.Utils.Logger () -- TH is broken shite and nee -- This is due to the boot file. import Control.Applicative ( (<|>) ) -import Data.Aeson +import Data.Aeson hiding (Key) import Data.Aeson.TH -import Data.Aeson.Types +import Data.Aeson.Types hiding (Key) import Data.List.NonEmpty ( NonEmpty(..) ) import Data.Text.Encoding as E import Data.Versions