Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package hpack for openSUSE:Factory checked 
in at 2021-02-16 22:39:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hpack (Old)
 and      /work/SRC/openSUSE:Factory/.hpack.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hpack"

Tue Feb 16 22:39:21 2021 rev:21 rq:870887 version:0.34.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/hpack/hpack.changes      2020-12-22 
11:50:00.654034362 +0100
+++ /work/SRC/openSUSE:Factory/.hpack.new.28504/hpack.changes   2021-02-16 
22:48:51.954576411 +0100
@@ -1,0 +2,8 @@
+Mon Feb  8 19:13:37 UTC 2021 - psim...@suse.com
+
+- Update hpack to version 0.34.4.
+  ## Changes in 0.34.4
+    - Render `default-extensions` / `other-extensions` line-separated
+    - Compatibility with `Cabal-3.4.0.0`
+
+-------------------------------------------------------------------

Old:
----
  hpack-0.34.3.tar.gz

New:
----
  hpack-0.34.4.tar.gz

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

Other differences:
------------------
++++++ hpack.spec ++++++
--- /var/tmp/diff_new_pack.hSaRch/_old  2021-02-16 22:48:52.590576908 +0100
+++ /var/tmp/diff_new_pack.hSaRch/_new  2021-02-16 22:48:52.594576910 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package hpack
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name hpack
 %bcond_with tests
 Name:           %{pkg_name}
-Version:        0.34.3
+Version:        0.34.4
 Release:        0
 Summary:        A modern format for Haskell packages
 License:        MIT

++++++ hpack-0.34.3.tar.gz -> hpack-0.34.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/CHANGELOG.md 
new/hpack-0.34.4/CHANGELOG.md
--- old/hpack-0.34.3/CHANGELOG.md       2020-12-07 22:59:08.000000000 +0100
+++ new/hpack-0.34.4/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,7 @@
+## Changes in 0.34.4
+  - Render `default-extensions` / `other-extensions` line-separated
+  - Compatibility with `Cabal-3.4.0.0`
+
 ## Changes in 0.34.3
   - Ignore duplicate source directories (see #356)
   - Do not infer duplicate modules (see  #408, #406, #353)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/hpack.cabal new/hpack-0.34.4/hpack.cabal
--- old/hpack-0.34.3/hpack.cabal        2020-12-07 22:59:08.000000000 +0100
+++ new/hpack-0.34.4/hpack.cabal        2001-09-09 03:46:40.000000000 +0200
@@ -1,11 +1,11 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.34.2.
+-- This file has been generated from package.yaml by hpack version 0.34.3.
 --
 -- see: https://github.com/sol/hpack
 
 name:           hpack
-version:        0.34.3
+version:        0.34.4
 synopsis:       A modern format for Haskell packages
 description:    See README at <https://github.com/sol/hpack#readme>
 category:       Development
@@ -27,7 +27,7 @@
       src
   ghc-options: -Wall
   build-depends:
-      Cabal >=3.0.0.0
+      Cabal >=3.0.0.0 && <3.6
     , Glob >=0.9.0
     , aeson >=1.4.3.0
     , base >=4.9 && <5
@@ -85,7 +85,7 @@
       driver
   ghc-options: -Wall
   build-depends:
-      Cabal >=3.0.0.0
+      Cabal >=3.0.0.0 && <3.6
     , Glob >=0.9.0
     , aeson >=1.4.3.0
     , base >=4.9 && <5
@@ -121,7 +121,7 @@
   ghc-options: -Wall
   cpp-options: -DTEST
   build-depends:
-      Cabal >=3.0.0.0
+      Cabal >=3.0.0.0 && <3.6
     , Glob >=0.9.0
     , HUnit >=1.6.0.0
     , QuickCheck
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/src/Hpack/Render.hs 
new/hpack-0.34.4/src/Hpack/Render.hs
--- old/hpack-0.34.3/src/Hpack/Render.hs        2020-12-07 22:59:08.000000000 
+0100
+++ new/hpack-0.34.4/src/Hpack/Render.hs        2001-09-09 03:46:40.000000000 
+0200
@@ -400,10 +400,10 @@
 renderBuildable = Field "buildable" . Literal . show
 
 renderDefaultExtensions :: [String] -> Element
-renderDefaultExtensions = Field "default-extensions" . WordList
+renderDefaultExtensions = Field "default-extensions" . LineSeparatedList
 
 renderOtherExtensions :: [String] -> Element
-renderOtherExtensions = Field "other-extensions" . WordList
+renderOtherExtensions = Field "other-extensions" . LineSeparatedList
 
 renderPaths :: [Path] -> Value
 renderPaths = LineSeparatedList . map renderPath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/src/Hpack/Syntax/Dependencies.hs 
new/hpack-0.34.4/src/Hpack/Syntax/Dependencies.hs
--- old/hpack-0.34.3/src/Hpack/Syntax/Dependencies.hs   2020-12-07 
22:59:08.000000000 +0100
+++ new/hpack-0.34.4/src/Hpack/Syntax/Dependencies.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TypeFamilies #-}
@@ -19,6 +20,12 @@
 import qualified Data.Map.Lazy as Map
 import           GHC.Exts
 
+#if MIN_VERSION_Cabal(3,4,0)
+import qualified Distribution.Compat.NonEmptySet as DependencySet
+#else
+import qualified Data.Set as DependencySet
+#endif
+
 import           Data.Aeson.Config.FromValue
 import           Data.Aeson.Config.Types
 
@@ -67,7 +74,7 @@
 parseDependency subject = fmap fromCabal . cabalParse subject . T.unpack
   where
     fromCabal :: D.Dependency -> (String, DependencyVersion)
-    fromCabal d = (toName (D.depPkgName d) (toList $ D.depLibraries d), 
DependencyVersion Nothing . versionConstraintFromCabal $ D.depVerRange d)
+    fromCabal d = (toName (D.depPkgName d) (DependencySet.toList $ 
D.depLibraries d), DependencyVersion Nothing . versionConstraintFromCabal $ 
D.depVerRange d)
 
     toName :: D.PackageName -> [D.LibraryName] -> String
     toName package components = prettyShow package <> case components of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/src/Hpack/Syntax/DependencyVersion.hs 
new/hpack-0.34.4/src/Hpack/Syntax/DependencyVersion.hs
--- old/hpack-0.34.3/src/Hpack/Syntax/DependencyVersion.hs      2020-12-07 
22:59:08.000000000 +0100
+++ new/hpack-0.34.4/src/Hpack/Syntax/DependencyVersion.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,7 @@
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE ViewPatterns #-}
 module Hpack.Syntax.DependencyVersion (
   githubBaseUrl
 , GitRef
@@ -33,11 +34,11 @@
 import qualified Data.HashMap.Strict as HashMap
 import           Text.PrettyPrint (renderStyle, Style(..), Mode(..))
 
-import           Distribution.Version (VersionRangeF(..))
 import qualified Distribution.Version as D
 
 import qualified Distribution.Parsec as D
 import qualified Distribution.Pretty as D
+import qualified Distribution.Types.VersionRange.Internal as D
 
 import           Data.Aeson.Config.FromValue
 
@@ -147,32 +148,42 @@
   Right d -> return d
   Left _ ->fail $ unwords ["invalid",  subject, show s]
 
+renderVersionRange :: D.VersionRange -> String
+renderVersionRange = \ case
+  D.IntersectVersionRanges (D.OrLaterVersion x) (D.EarlierVersion y) | 
differByOneInLeastPosition (x, y) -> "==" ++ render x ++ ".*"
+  v -> render v
+  where
+    differByOneInLeastPosition = \ case
+      (reverse . D.versionNumbers -> x : xs, reverse . D.versionNumbers -> y : 
ys) -> xs == ys && succ x == y
+      _ -> False
+
+render :: D.Pretty a => a -> String
+render = renderStyle (Style OneLineMode 0 0) . D.pretty
+
 versionConstraintFromCabal :: D.VersionRange -> VersionConstraint
 versionConstraintFromCabal range
   | D.isAnyVersion range = AnyVersion
-  | otherwise = VersionRange . renderStyle style .
-      D.pretty
-      $ toPreCabal2VersionRange range
+  | otherwise = VersionRange . renderVersionRange $ toPreCabal2VersionRange 
range
   where
-    style = Style OneLineMode 0 0
-
     toPreCabal2VersionRange :: D.VersionRange -> D.VersionRange
     toPreCabal2VersionRange = D.embedVersionRange . D.cataVersionRange f
       where
-        f :: VersionRangeF (VersionRangeF D.VersionRange) -> VersionRangeF 
D.VersionRange
+        f :: D.VersionRangeF (D.VersionRangeF D.VersionRange) -> 
D.VersionRangeF D.VersionRange
         f = \ case
-          MajorBoundVersionF v -> IntersectVersionRangesF (D.embedVersionRange 
lower) (D.embedVersionRange upper)
+          D.MajorBoundVersionF v -> D.IntersectVersionRangesF 
(D.embedVersionRange lower) (D.embedVersionRange upper)
             where
-              lower = OrLaterVersionF v
-              upper = EarlierVersionF (D.majorUpperBound v)
+              lower = D.OrLaterVersionF v
+              upper = D.EarlierVersionF (D.majorUpperBound v)
 
-          AnyVersionF -> AnyVersionF
-          ThisVersionF v -> ThisVersionF v
-          LaterVersionF v -> LaterVersionF v
-          OrLaterVersionF v -> OrLaterVersionF v
-          EarlierVersionF v -> EarlierVersionF v
-          OrEarlierVersionF v -> OrEarlierVersionF v
-          WildcardVersionF v -> WildcardVersionF v
-          UnionVersionRangesF a b -> UnionVersionRangesF (D.embedVersionRange 
a) (D.embedVersionRange b)
-          IntersectVersionRangesF a b -> IntersectVersionRangesF 
(D.embedVersionRange a) (D.embedVersionRange b)
-          VersionRangeParensF a -> VersionRangeParensF (D.embedVersionRange a)
+          D.ThisVersionF v -> D.ThisVersionF v
+          D.LaterVersionF v -> D.LaterVersionF v
+          D.OrLaterVersionF v -> D.OrLaterVersionF v
+          D.EarlierVersionF v -> D.EarlierVersionF v
+          D.OrEarlierVersionF v -> D.OrEarlierVersionF v
+          D.UnionVersionRangesF a b -> D.UnionVersionRangesF 
(D.embedVersionRange a) (D.embedVersionRange b)
+          D.IntersectVersionRangesF a b -> D.IntersectVersionRangesF 
(D.embedVersionRange a) (D.embedVersionRange b)
+#if !MIN_VERSION_Cabal(3,4,0)
+          D.WildcardVersionF v -> D.WildcardVersionF v
+          D.VersionRangeParensF a -> D.VersionRangeParensF 
(D.embedVersionRange a)
+          D.AnyVersionF -> D.AnyVersionF
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/test/EndToEndSpec.hs 
new/hpack-0.34.4/test/EndToEndSpec.hs
--- old/hpack-0.34.3/test/EndToEndSpec.hs       2020-12-07 22:59:08.000000000 
+0100
+++ new/hpack-0.34.4/test/EndToEndSpec.hs       2001-09-09 03:46:40.000000000 
+0200
@@ -95,7 +95,9 @@
           default-extensions: [RebindableSyntax, OverloadedStrings]
           library: {}
           |] `shouldRenderTo` (library [i|
-          default-extensions: RebindableSyntax OverloadedStrings
+          default-extensions:
+              RebindableSyntax
+              OverloadedStrings
           other-modules:
               Paths_foo
           |]) {packageCabalVersion = "2.2"}
@@ -109,7 +111,9 @@
               - condition: false
                 other-modules: Paths_foo
             |] `shouldRenderTo` (library [i|
-            default-extensions: RebindableSyntax OverloadedStrings
+            default-extensions:
+                RebindableSyntax
+                OverloadedStrings
             |])
 
     describe "spec-version" $ do
@@ -279,7 +283,9 @@
           ref: "2017"
         library: {}
         |] `shouldRenderTo` library_ [i|
-        default-extensions: RecordWildCards DeriveFunctor
+        default-extensions:
+            RecordWildCards
+            DeriveFunctor
         |]
 
       it "accepts library defaults" $ do
@@ -309,7 +315,9 @@
           - foo/bar@v2
         library: {}
         |] `shouldRenderTo` library_ [i|
-        default-extensions: RecordWildCards DeriveFunctor
+        default-extensions:
+            RecordWildCards
+            DeriveFunctor
         |]
 
       it "accepts defaults recursively" $ do
@@ -319,7 +327,8 @@
         defaults: foo/bar@v1
         library: {}
         |] `shouldRenderTo` library_ [i|
-        default-extensions: DeriveFunctor
+        default-extensions:
+            DeriveFunctor
         |]
 
       it "fails on cyclic defaults" $ do
@@ -390,7 +399,9 @@
         |] `shouldRenderTo` library [i|
         other-modules:
             Paths_foo
-        default-extensions: RecordWildCards DeriveFunctor
+        default-extensions:
+            RecordWildCards
+            DeriveFunctor
         |]
 
     describe "version" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.34.3/test/Hpack/Syntax/DependenciesSpec.hs 
new/hpack-0.34.4/test/Hpack/Syntax/DependenciesSpec.hs
--- old/hpack-0.34.3/test/Hpack/Syntax/DependenciesSpec.hs      2020-12-07 
22:59:08.000000000 +0100
+++ new/hpack-0.34.4/test/Hpack/Syntax/DependenciesSpec.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -39,8 +39,8 @@
 
         it "accepts dependencies with constraints" $ do
           [yaml|
-            hpack >= 2 && < 3
-          |] `shouldDecodeTo_` Dependencies [("hpack", defaultInfo { 
dependencyInfoVersion = versionRange ">=2 && <3" })]
+            hpack >= 2 && < 4
+          |] `shouldDecodeTo_` Dependencies [("hpack", defaultInfo { 
dependencyInfoVersion = versionRange ">=2 && <4" })]
 
         context "with invalid constraint" $ do
           it "returns an error message" $ do
@@ -56,8 +56,8 @@
 
         it "accepts dependencies with constraints" $ do
           [yaml|
-            - hpack >= 2 && < 3
-          |] `shouldDecodeTo_` Dependencies [("hpack", defaultInfo { 
dependencyInfoVersion = versionRange ">=2 && <3" })]
+            - hpack >= 2 && < 4
+          |] `shouldDecodeTo_` Dependencies [("hpack", defaultInfo { 
dependencyInfoVersion = versionRange ">=2 && <4" })]
 
         it "accepts ^>=" $ do
           [yaml|

Reply via email to