Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-aeson-yaml for openSUSE:Factory checked in at 2021-12-19 17:34:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-aeson-yaml (Old) and /work/SRC/openSUSE:Factory/.ghc-aeson-yaml.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-aeson-yaml" Sun Dec 19 17:34:19 2021 rev:4 rq:932874 version:1.1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-aeson-yaml/ghc-aeson-yaml.changes 2021-02-16 22:48:18.114549973 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-aeson-yaml.new.2520/ghc-aeson-yaml.changes 2021-12-19 17:34:27.968266191 +0100 @@ -1,0 +2,10 @@ +Mon Nov 15 06:59:30 UTC 2021 - [email protected] + +- Update aeson-yaml to version 1.1.0.1. + ## 1.1.0.1 - 2021-11-13 + + ### Changed + + - Support aeson-2.0 (thanks to Simon Jakobi) + +------------------------------------------------------------------- Old: ---- aeson-yaml-1.1.0.0.tar.gz aeson-yaml.cabal New: ---- aeson-yaml-1.1.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-aeson-yaml.spec ++++++ --- /var/tmp/diff_new_pack.5Bhk7M/_old 2021-12-19 17:34:28.364266470 +0100 +++ /var/tmp/diff_new_pack.5Bhk7M/_new 2021-12-19 17:34:28.368266473 +0100 @@ -19,13 +19,12 @@ %global pkg_name aeson-yaml %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.1.0.0 +Version: 1.1.0.1 Release: 0 Summary: Output any Aeson value as YAML (pure Haskell library) License: BSD-3-Clause URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-bytestring-devel @@ -37,7 +36,6 @@ %if %{with tests} BuildRequires: ghc-string-qq-devel BuildRequires: ghc-tasty-devel -BuildRequires: ghc-tasty-discover-devel BuildRequires: ghc-tasty-hunit-devel BuildRequires: ghc-yaml-devel %endif @@ -61,7 +59,6 @@ %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ aeson-yaml-1.1.0.0.tar.gz -> aeson-yaml-1.1.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-yaml-1.1.0.0/CHANGELOG.md new/aeson-yaml-1.1.0.1/CHANGELOG.md --- old/aeson-yaml-1.1.0.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/aeson-yaml-1.1.0.1/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,11 @@ # Changelog +## 1.1.0.1 - 2021-11-13 + +### Changed + + - Support aeson-2.0 (thanks to Simon Jakobi) + ## 1.1.0.0 - 2020-06-25 ### Changed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-yaml-1.1.0.0/aeson-yaml.cabal new/aeson-yaml-1.1.0.1/aeson-yaml.cabal --- old/aeson-yaml-1.1.0.0/aeson-yaml.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/aeson-yaml-1.1.0.1/aeson-yaml.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,7 +1,7 @@ cabal-version: 1.12 name: aeson-yaml -version: 1.1.0.0 +version: 1.1.0.1 homepage: https://github.com/clovyr/aeson-yaml bug-reports: https://github.com/clovyr/aeson-yaml/issues author: Patrick Nielsen @@ -37,9 +37,9 @@ exposed-modules: Data.Aeson.Yaml build-depends: - aeson >= 0.4.0.0 && < 1.6 + aeson >= 0.4.0.0 && < 2.1 , base >= 4.8.2.0 && < 5 - , bytestring >= 0.10.4.0 && < 0.11 + , bytestring >= 0.10.4.0 && < 0.12 , text >= 0.1 && < 1.3 , unordered-containers >= 0.1.0.0 && < 0.3 , vector >= 0.1 && < 0.13 @@ -61,10 +61,10 @@ -- , hedgehog-gen-json , string-qq , tasty - , tasty-discover , tasty-hunit , unordered-containers , yaml + build-tool-depends: tasty-discover:tasty-discover type: exitcode-stdio-1.0 default-language: Haskell2010 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-yaml-1.1.0.0/src/Data/Aeson/Yaml.hs new/aeson-yaml-1.1.0.1/src/Data/Aeson/Yaml.hs --- old/aeson-yaml-1.1.0.0/src/Data/Aeson/Yaml.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/aeson-yaml-1.1.0.1/src/Data/Aeson/Yaml.hs 2001-09-09 03:46:40.000000000 +0200 @@ -8,6 +8,7 @@ This module is meant to be imported qualified. -} +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Data.Aeson.Yaml @@ -25,14 +26,22 @@ import qualified Data.ByteString.Lazy as ByteString.Lazy import qualified Data.ByteString.Short as ByteString.Short import Data.Char (isAlpha, isDigit) -import qualified Data.HashMap.Strict as HashMap -import Data.List (intersperse, sortOn) +import Data.List (intersperse) import Data.Monoid ((<>), mconcat, mempty) import qualified Data.Text as Text import Data.Text (Text) import qualified Data.Text.Encoding as Text.Encoding import qualified Data.Vector as Vector +#if MIN_VERSION_aeson(2,0,0) +import qualified Data.Aeson.Key as Key +import qualified Data.Aeson.KeyMap as KeyMap +import Data.Bifunctor (first) +#else +import qualified Data.HashMap.Strict as HashMap +import Data.List (sortOn) +#endif + b :: ByteString -> Builder b = ByteString.Builder.byteString @@ -81,15 +90,15 @@ encodeBuilder :: Bool -> Bool -> Int -> Data.Aeson.Value -> Builder encodeBuilder alwaysQuote newlineBeforeObject level value = case value of - Object hm - | null hm -> bs "{}" + Object km + | null km -> bs "{}" | otherwise -> mconcat $ (if newlineBeforeObject then (prefix :) else id) $ intersperse prefix $ - map (keyValue level) (sortOn fst $ HashMap.toList hm) + map (keyValue level) (objectToAscList km) where prefix = bs "\n" <> indent level Array vec | null vec -> bs "[]" @@ -173,3 +182,10 @@ case ls of (line:_) -> " " `Text.isPrefixOf` line _ -> False + +objectToAscList :: Object -> [(Text, Value)] +#if MIN_VERSION_aeson(2,0,0) +objectToAscList = map (first Key.toText) . KeyMap.toAscList +#else +objectToAscList = sortOn fst . HashMap.toList +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-yaml-1.1.0.0/test/Test/Data/Aeson/Yaml.hs new/aeson-yaml-1.1.0.1/test/Test/Data/Aeson/Yaml.hs --- old/aeson-yaml-1.1.0.0/test/Test/Data/Aeson/Yaml.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/aeson-yaml-1.1.0.1/test/Test/Data/Aeson/Yaml.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE QuasiQuotes #-} @@ -7,10 +8,15 @@ import qualified Data.Aeson import qualified Data.ByteString.Lazy import Data.Either (fromRight) -import qualified Data.HashMap.Strict as HashMap import Data.String.QQ (s) import qualified Data.Yaml +#if MIN_VERSION_aeson(2,0,0) +import qualified Data.Aeson.KeyMap as KeyMap +#else +import qualified Data.HashMap.Strict as HashMap +#endif + -- import Hedgehog -- import Hedgehog.Gen -- import Hedgehog.Gen.JSON (genJSONValue, sensibleRanges) @@ -243,7 +249,14 @@ } foo :: Data.Aeson.Value -foo = Data.Aeson.Object $ HashMap.fromList [("foo", "bar")] +foo = + Data.Aeson.Object $ +#if MIN_VERSION_aeson(2,0,0) + KeyMap.fromList +#else + HashMap.fromList +#endif + [("foo", "bar")] test_testCases :: TestTree test_testCases = testGroup "Test Cases" $ map mkTestCase testCases
