Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-hslua-module-version for 
openSUSE:Factory checked in at 2022-10-13 15:42:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hslua-module-version (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-hslua-module-version.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-hslua-module-version"

Thu Oct 13 15:42:11 2022 rev:4 rq:1008474 version:1.0.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-hslua-module-version/ghc-hslua-module-version.changes
        2022-08-01 21:28:56.625405973 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-hslua-module-version.new.2275/ghc-hslua-module-version.changes
      2022-10-13 15:42:17.166754429 +0200
@@ -1,0 +2,14 @@
+Thu Sep  1 17:24:55 UTC 2022 - Peter Simons <[email protected]>
+
+- Update hslua-module-version to version 1.0.3.
+  ## hslua-module-version-1.0.3
+
+  Released 2022-09-01.
+
+  -   Allow equality checks with non-version values: A *Version*
+      value can now be compared with any value. Previously,
+      comparing a version with a value that cannot be interpreted as
+      a Version would result in an error, violating the principle of
+      least surprise.
+
+-------------------------------------------------------------------

Old:
----
  hslua-module-version-1.0.2.tar.gz

New:
----
  hslua-module-version-1.0.3.tar.gz

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

Other differences:
------------------
++++++ ghc-hslua-module-version.spec ++++++
--- /var/tmp/diff_new_pack.qBeJpo/_old  2022-10-13 15:42:18.106756265 +0200
+++ /var/tmp/diff_new_pack.qBeJpo/_new  2022-10-13 15:42:18.118756288 +0200
@@ -19,7 +19,7 @@
 %global pkg_name hslua-module-version
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.0.2
+Version:        1.0.3
 Release:        0
 Summary:        Lua module to work with version specifiers
 License:        MIT

++++++ hslua-module-version-1.0.2.tar.gz -> hslua-module-version-1.0.3.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-module-version-1.0.2/CHANGELOG.md 
new/hslua-module-version-1.0.3/CHANGELOG.md
--- old/hslua-module-version-1.0.2/CHANGELOG.md 2001-09-09 03:46:40.000000000 
+0200
+++ new/hslua-module-version-1.0.3/CHANGELOG.md 2001-09-09 03:46:40.000000000 
+0200
@@ -2,6 +2,16 @@
 
 `hslua-module-version` uses [PVP Versioning][].
 
+## hslua-module-version-1.0.3
+
+Released 2022-09-01.
+
+-   Allow equality checks with non-version values: A *Version*
+    value can now be compared with any value. Previously,
+    comparing a version with a value that cannot be interpreted as
+    a Version would result in an error, violating the principle of
+    least surprise.
+
 ## hslua-module-version-1.0.2
 
 Released 2022-02-19.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-module-version-1.0.2/LICENSE 
new/hslua-module-version-1.0.3/LICENSE
--- old/hslua-module-version-1.0.2/LICENSE      2001-09-09 03:46:40.000000000 
+0200
+++ new/hslua-module-version-1.0.3/LICENSE      2001-09-09 03:46:40.000000000 
+0200
@@ -1,4 +1,4 @@
-Copyright ?? 1994-2020 Lua.org, PUC-Rio.
+Copyright ?? 1994-2022 Lua.org, PUC-Rio.
 Copyright ?? 2007-2012 Gracjan Polak
 Copyright ?? 2012-2015 ??mer Sinan A??acan
 Copyright ?? 2016-2022 Albert Krewinkel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hslua-module-version-1.0.2/hslua-module-version.cabal 
new/hslua-module-version-1.0.3/hslua-module-version.cabal
--- old/hslua-module-version-1.0.2/hslua-module-version.cabal   2001-09-09 
03:46:40.000000000 +0200
+++ new/hslua-module-version-1.0.3/hslua-module-version.cabal   2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 name:                hslua-module-version
-version:             1.0.2
+version:             1.0.3
 synopsis:            Lua module to work with version specifiers.
 description:         Wrapper for the Data.Version.Version Haskell type.
 homepage:            https://hslua.org/
@@ -21,8 +21,8 @@
                    , GHC == 8.6.5
                    , GHC == 8.8.4
                    , GHC == 8.10.7
-                   , GHC == 9.0.1
-                   , GHC == 9.2.1
+                   , GHC == 9.0.2
+                   , GHC == 9.2.3
 
 source-repository head
   type:                git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hslua-module-version-1.0.2/src/HsLua/Module/Version.hs 
new/hslua-module-version-1.0.3/src/HsLua/Module/Version.hs
--- old/hslua-module-version-1.0.2/src/HsLua/Module/Version.hs  2001-09-09 
03:46:40.000000000 +0200
+++ new/hslua-module-version-1.0.3/src/HsLua/Module/Version.hs  2001-09-09 
03:46:40.000000000 +0200
@@ -21,6 +21,7 @@
 where
 
 import Prelude hiding (error)
+import Control.Applicative (optional)
 import Data.Maybe (fromMaybe)
 import Data.Version
   ( Version, makeVersion, parseVersion, showVersion, versionBranch )
@@ -58,7 +59,11 @@
 -- | Type definition of Lua Version values.
 typeVersion :: LuaError e => DocumentedTypeWithList e Version Int
 typeVersion = deftype' "Version"
-  [ operation Eq $ versionComparison (==) "true iff v1 == v2"
+  [ operation Eq $ lambda
+      ### liftPure2 (\a b -> fromMaybe False ((==) <$> a <*> b))
+      <#> parameter (optional . peekVersionFuzzy) "Version" "a" ""
+      <#> parameter (optional . peekVersionFuzzy) "Version" "b" ""
+      =#> boolResult "true iff v1 == v2"
   , operation Le $ versionComparison (<=) "true iff v1 <= v2"
   , operation Lt $ versionComparison (<)  "true iff v1 < v2"
   , operation Len $ lambda
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-module-version-1.0.2/test/test-version.lua 
new/hslua-module-version-1.0.3/test/test-version.lua
--- old/hslua-module-version-1.0.2/test/test-version.lua        2001-09-09 
03:46:40.000000000 +0200
+++ new/hslua-module-version-1.0.3/test/test-version.lua        2001-09-09 
03:46:40.000000000 +0200
@@ -53,6 +53,23 @@
       assert.is_truthy(Version '8' < '9.1')
       assert.is_falsy(Version '8.8' < '8.7')
     end),
+    test('equality test works with value not usable as a version', function ()
+      assert.is_falsy(Version '8' == function() end)
+    end),
+    test('other comparisons fail if one value is not a version', function ()
+      assert.error_matches(
+        function () return Version '8' < (function() end) end,
+        'could not peek Version'
+      )
+      assert.error_matches(
+        function () return Version '8' <= (function() end) end,
+        'could not peek Version'
+      )
+      assert.error_matches(
+        function () return Version '8' > (function() end) end,
+        'could not peek Version'
+      )
+    end)
   },
 
   group 'conversion to string' {

Reply via email to