Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-HsYAML-aeson for 
openSUSE:Factory checked in at 2021-11-11 21:37:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-HsYAML-aeson (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-HsYAML-aeson.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-HsYAML-aeson"

Thu Nov 11 21:37:29 2021 rev:8 rq:930426 version:0.2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-HsYAML-aeson/ghc-HsYAML-aeson.changes        
2021-03-28 11:57:37.996291476 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-HsYAML-aeson.new.1890/ghc-HsYAML-aeson.changes  
    2021-11-11 21:38:11.604966167 +0100
@@ -1,0 +2,9 @@
+Mon Nov  8 16:32:50 UTC 2021 - [email protected]
+
+- Update HsYAML-aeson to version 0.2.0.1.
+  ## 0.2.0.1
+
+  * Allow `aeson-2.0` and `bytestring-0.11`.
+  * Build tested with GHC 7.4 -- 9.0.
+
+-------------------------------------------------------------------

Old:
----
  HsYAML-aeson-0.2.0.0.tar.gz
  HsYAML-aeson.cabal

New:
----
  HsYAML-aeson-0.2.0.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-HsYAML-aeson.spec ++++++
--- /var/tmp/diff_new_pack.b7UCHr/_old  2021-11-11 21:38:11.980966442 +0100
+++ /var/tmp/diff_new_pack.b7UCHr/_new  2021-11-11 21:38:11.980966442 +0100
@@ -18,13 +18,12 @@
 
 %global pkg_name HsYAML-aeson
 Name:           ghc-%{pkg_name}
-Version:        0.2.0.0
+Version:        0.2.0.1
 Release:        0
 Summary:        JSON to YAML Adapter
 License:        GPL-2.0-or-later
 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/3.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-HsYAML-devel
 BuildRequires:  ghc-aeson-devel
@@ -62,7 +61,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ HsYAML-aeson-0.2.0.0.tar.gz -> HsYAML-aeson-0.2.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HsYAML-aeson-0.2.0.0/CHANGELOG.md 
new/HsYAML-aeson-0.2.0.1/CHANGELOG.md
--- old/HsYAML-aeson-0.2.0.0/CHANGELOG.md       2001-09-09 03:46:40.000000000 
+0200
+++ new/HsYAML-aeson-0.2.0.1/CHANGELOG.md       2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,10 @@
 See also http://pvp.haskell.org/faq
 
+## 0.2.0.1
+
+* Allow `aeson-2.0` and `bytestring-0.11`.
+* Build tested with GHC 7.4 -- 9.0.
+
 ## 0.2.0.0
 
 This release incorporates the work from [Vijay Tadikamalla's GSOC 2019 
Project](https://vijayphoenix.github.io/blog/gsoc-the-conclusion/).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HsYAML-aeson-0.2.0.0/HsYAML-aeson.cabal 
new/HsYAML-aeson-0.2.0.1/HsYAML-aeson.cabal
--- old/HsYAML-aeson-0.2.0.0/HsYAML-aeson.cabal 2001-09-09 03:46:40.000000000 
+0200
+++ new/HsYAML-aeson-0.2.0.1/HsYAML-aeson.cabal 2001-09-09 03:46:40.000000000 
+0200
@@ -1,10 +1,10 @@
 cabal-version:       2.2
 name:                HsYAML-aeson
-version:             0.2.0.0
+version:             0.2.0.1
 license:             GPL-2.0-or-later
 license-file:        LICENSE.GPLv2
 author:              Herbert Valerio Riedel
-maintainer:          [email protected]
+maintainer:          [email protected], Andreas Abel
 copyright:           2018-2019 Herbert Valerio Riedel
 category:            Text, Codec, Web, JSON, YAML
 synopsis:            JSON to YAML Adapter
@@ -20,6 +20,19 @@
   convenience by reusing [aeson](https://hackage.haskell.org/package/aeson)'s
   'FromJSON' instances for decoding the YAML data into native Haskell data 
types.
 
+tested-with:
+  GHC == 9.0.1
+  GHC == 8.10.7
+  GHC == 8.8.4
+  GHC == 8.6.5
+  GHC == 8.4.4
+  GHC == 8.2.2
+  GHC == 8.0.2
+  GHC == 7.10.3
+  GHC == 7.8.4
+  GHC == 7.6.3
+  GHC == 7.4.2
+
 extra-source-files:
   CHANGELOG.md
 
@@ -27,13 +40,18 @@
   type: git
   location: https://github.com/hvr/HsYAML-aeson.git
 
+flag exe
+  description: Enable @exe:yaml-test@ component
+  manual: True
+  default: False
+
 library
   exposed-modules: Data.YAML.Aeson
   build-depends:
     , HsYAML      ^>= 0.2.0
-    , aeson       ^>= 1.4.0.0
-    , base         >= 4.5 && < 4.14
-    , bytestring  ^>= 0.9.2.1 || ^>= 0.10.0.2
+    , aeson       ^>= 1.4.0.0 || ^>= 1.5.0.0 || ^>= 2.0.0.0
+    , base         >= 4.5 && < 4.17
+    , bytestring  ^>= 0.9.2.1 || ^>= 0.10.0.2 || ^>= 0.11.0.0
     , containers   >=0.4.2 && <0.7
     , mtl         ^>= 2.2.1
     , scientific  ^>= 0.3.6.2
@@ -45,3 +63,18 @@
   default-language:    Haskell2010
   other-extensions:    RecordWildCards Trustworthy
   ghc-options: -Wall
+
+executable yaml-test
+  hs-source-dirs:      src-test
+  main-is:             Main.hs
+  default-language:    Haskell2010
+
+  if flag(exe)
+    build-depends: HsYAML
+                 , HsYAML-aeson
+                 , base
+                 , aeson
+                 , bytestring
+                 , directory   >= 1.2 && < 1.4
+  else
+    buildable: False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HsYAML-aeson-0.2.0.0/LICENSE.GPLv2 
new/HsYAML-aeson-0.2.0.1/LICENSE.GPLv2
--- old/HsYAML-aeson-0.2.0.0/LICENSE.GPLv2      2001-09-09 03:46:40.000000000 
+0200
+++ new/HsYAML-aeson-0.2.0.1/LICENSE.GPLv2      2001-09-09 03:46:40.000000000 
+0200
@@ -1,7 +1,6 @@
              GNU GENERAL PUBLIC LICENSE
                 Version 2, June 1991
 
-
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HsYAML-aeson-0.2.0.0/src/Data/YAML/Aeson.hs 
new/HsYAML-aeson-0.2.0.1/src/Data/YAML/Aeson.hs
--- old/HsYAML-aeson-0.2.0.0/src/Data/YAML/Aeson.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/HsYAML-aeson-0.2.0.1/src/Data/YAML/Aeson.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -39,6 +39,10 @@
 import           Control.Applicative    as Ap
 import           Control.Monad.Identity (runIdentity)
 import           Data.Aeson             as J
+#if MIN_VERSION_aeson(2,0,0)
+import qualified Data.Aeson.Key                as AK
+import qualified Data.Aeson.KeyMap             as AKM
+#endif
 import qualified Data.Aeson.Types       as J
 import qualified Data.ByteString        as BS
 import qualified Data.ByteString.Lazy   as BS.L
@@ -164,8 +168,13 @@
 
     mkPair :: Pos -> (J.Value,J.Value) -> Either (Pos, String) J.Pair
     mkPair pos (k, v) = case keyconv k of
-        Right k' -> Right (k', v)
+        Right k' -> Right (fT k', v)
         Left s   -> Left (pos, s)
+#if MIN_VERSION_aeson(2,0,0)
+    fT = AK.fromText
+#else
+    fT = id   
+#endif
 
     mkArr :: [J.Value] -> Either (Pos, String) J.Value
     mkArr xs = Right $! J.Array $! V.fromList xs
@@ -207,7 +216,15 @@
     Right d  -> toYAML d
     Left int -> toYAML int
   toYAML (J.Array a) = toYAML (V.toList a)
-  toYAML (J.Object o) = toYAML (Map.fromList (HM.toList o))
+  toYAML (J.Object o) = toYAML (Map.fromList (fromObject o))
+   where
+#if MIN_VERSION_aeson(2,0,0)
+    fromObject = fmap (\(k, v) -> (AK.toText k, v)) . AKM.toList
+#else
+    fromObject = HM.toList
+#endif
+
+
 
 -- | Serialize JSON Value using the YAML 1.2 Core schema to a lazy 
'BS.L.ByteString'.
 --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HsYAML-aeson-0.2.0.0/src-test/Main.hs 
new/HsYAML-aeson-0.2.0.1/src-test/Main.hs
--- old/HsYAML-aeson-0.2.0.0/src-test/Main.hs   1970-01-01 01:00:00.000000000 
+0100
+++ new/HsYAML-aeson-0.2.0.1/src-test/Main.hs   2001-09-09 03:46:40.000000000 
+0200
@@ -0,0 +1,60 @@
+-- |
+-- Copyright: ?? Herbert Valerio Riedel 2018
+-- SPDX-License-Identifier: GPL-2.0-or-later
+--
+module Main where
+
+import qualified Data.Aeson                 as J
+import qualified Data.ByteString.Char8      as BS
+import qualified Data.ByteString.Lazy.Char8 as BS.L
+import           System.Environment
+import           System.Exit
+import           System.IO
+import           Data.YAML
+import           Data.YAML.Aeson
+
+main :: IO ()
+main = do
+  args <- getArgs
+
+  case args of
+    ("yaml2json":args')
+      | null args' -> cmdYaml2Json
+      | otherwise -> do
+          hPutStrLn stderr "unexpected arguments passed to yaml2json 
sub-command"
+          exitFailure
+
+    ("json2yaml":args')
+      | null args' -> cmdJson2Yaml
+      | otherwise -> do
+          hPutStrLn stderr "unexpected arguments passed to json2yaml 
sub-command"
+          exitFailure
+
+    _ -> do
+      hPutStrLn stderr "usage: yaml-test <command> [<args>]"
+      hPutStrLn stderr ""
+      hPutStrLn stderr "Commands:"
+      hPutStrLn stderr ""
+      hPutStrLn stderr "  yaml2json           reads YAML stream from STDIN and 
dumps JSON to STDOUT"
+      hPutStrLn stderr "  json2yaml           reads JSON stream from STDIN and 
dumps YAML to STDOUT"
+      exitFailure
+
+
+cmdYaml2Json :: IO ()
+cmdYaml2Json = do
+  inYamlDat <- BS.L.getContents
+  case decodeValue inYamlDat of
+    Left (loc, err) -> do
+      hPutStrLn stderr (prettyPosWithSource loc inYamlDat " error" ++ err)
+      exitFailure
+    Right x -> (BS.L.putStr . J.encode) x
+
+
+cmdJson2Yaml :: IO ()
+cmdJson2Yaml = do
+  inJsonDat <- BS.L.getContents
+  case J.eitherDecode inJsonDat of
+    Left e -> do
+      hPutStrLn stderr e
+      exitFailure
+    Right x -> (BS.L.putStr . encodeValue . return) x

Reply via email to