Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-hslua-list for openSUSE:Factory 
checked in at 2023-04-04 21:20:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hslua-list (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-hslua-list.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-hslua-list"

Tue Apr  4 21:20:26 2023 rev:2 rq:1075902 version:1.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-hslua-list/ghc-hslua-list.changes    
2023-01-28 18:51:58.252883060 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-hslua-list.new.19717/ghc-hslua-list.changes 
2023-04-04 21:20:42.497294813 +0200
@@ -1,0 +2,14 @@
+Thu Mar 30 17:07:01 UTC 2023 - Peter Simons <[email protected]>
+
+- Updated spec file to conform with ghc-rpm-macros-2.5.2.
+
+-------------------------------------------------------------------
+Fri Mar 17 19:23:59 UTC 2023 - Peter Simons <[email protected]>
+
+- Update hslua-list to version 1.1.1.
+  Upstream has edited the change log file since the last release in
+  a non-trivial way, i.e. they did more than just add a new entry
+  at the top. You can review the file at:
+  http://hackage.haskell.org/package/hslua-list-1.1.1/src/CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  hslua-list-1.1.0.1.tar.gz

New:
----
  hslua-list-1.1.1.tar.gz

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

Other differences:
------------------
++++++ ghc-hslua-list.spec ++++++
--- /var/tmp/diff_new_pack.9uYEJW/_old  2023-04-04 21:20:43.601301065 +0200
+++ /var/tmp/diff_new_pack.9uYEJW/_new  2023-04-04 21:20:43.645301314 +0200
@@ -17,22 +17,29 @@
 
 
 %global pkg_name hslua-list
+%global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.1.0.1
+Version:        1.1.1
 Release:        0
 Summary:        Opinionated, but extensible Lua list type
 License:        MIT
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-base-devel
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-hslua-core-devel
+BuildRequires:  ghc-hslua-core-prof
 BuildRequires:  ghc-rpm-macros
 ExcludeArch:    %{ix86}
 %if %{with tests}
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-lua-devel
+BuildRequires:  ghc-tasty-lua-prof
+BuildRequires:  ghc-tasty-prof
 %endif
 
 %description
@@ -48,6 +55,22 @@
 %description devel
 This package provides the Haskell %{pkg_name} library development files.
 
+%package -n ghc-%{pkg_name}-doc
+Summary:        Haskell %{pkg_name} library documentation
+Requires:       ghc-filesystem
+BuildArch:      noarch
+
+%description -n ghc-%{pkg_name}-doc
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary:        Haskell %{pkg_name} profiling library
+Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements:    (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
 %prep
 %autosetup -n %{pkg_name}-%{version}
 
@@ -72,4 +95,9 @@
 %files devel -f %{name}-devel.files
 %doc CHANGELOG.md README.md
 
+%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
 %changelog

++++++ hslua-list-1.1.0.1.tar.gz -> hslua-list-1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/CHANGELOG.md 
new/hslua-list-1.1.1/CHANGELOG.md
--- old/hslua-list-1.1.0.1/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
+++ new/hslua-list-1.1.1/CHANGELOG.md   2001-09-09 03:46:40.000000000 +0200
@@ -2,6 +2,14 @@
 
 `hslua-list` uses [PVP Versioning](https://pvp.haskell.org).
 
+## hslua-list-1.1.1
+
+Released 2023-03-17.
+
+-   Conversion to strings: added a `__tostring` that lists all
+    elements separated by commas and a space, surrounded by braces
+    and prefixed with the metatable's name.
+
 ## hslua-list-1.1.0.1
 
 Released 2023-01-23.
@@ -11,7 +19,7 @@
 
 ## hslua-list-1.1.0
 
-Release pending.
+Released 2023-03-13.
 
 -   Removed `pushPandocList`. The function was a left-over from
     pandoc-lua-marshal, the place where this package originated.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/LICENSE 
new/hslua-list-1.1.1/LICENSE
--- old/hslua-list-1.1.0.1/LICENSE      2001-09-09 03:46:40.000000000 +0200
+++ new/hslua-list-1.1.1/LICENSE        2001-09-09 03:46:40.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright © 2021-2022 Albert Krewinkel
+Copyright © 2021-2023 Albert Krewinkel
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/cbits/listmod.c 
new/hslua-list-1.1.1/cbits/listmod.c
--- old/hslua-list-1.1.0.1/cbits/listmod.c      2001-09-09 03:46:40.000000000 
+0200
+++ new/hslua-list-1.1.1/cbits/listmod.c        2001-09-09 03:46:40.000000000 
+0200
@@ -264,6 +264,39 @@
   return 1;
 }
 
+
+static void addfield (lua_State *L, luaL_Buffer *b, lua_Integer i) {
+  lua_geti(L, 1, i);
+  luaL_tolstring(L, -1, NULL);
+  lua_remove(L, -2);  /* element */
+  luaL_addvalue(b);
+}
+
+/*
+** Convert the list to a string.
+*/
+static int list_tostring(lua_State *L) {
+  luaL_Buffer b;
+  lua_Integer len = luaL_len(L, 1);
+  luaL_buffinit(L, &b);
+  /* Prefix the string with name from metatable */
+  if (luaL_getmetafield(L, 1, "__name") != LUA_TNIL) {
+    luaL_addvalue(&b);
+    luaL_addchar(&b, ' ');
+  }
+  luaL_addchar(&b, '{');
+  lua_Integer i = 1;
+  for (; i < len; i++) {
+    addfield(L, &b, i);
+    luaL_addstring(&b, ", ");
+  }
+  if (i == len)  /* add last value (if interval was not empty) */
+    addfield(L, &b, i);
+  luaL_addchar(&b, '}');
+  luaL_pushresult(&b);
+  return 1;
+}
+
 /*
 ** Pushes the standard `table` module to the stack.
 */
@@ -309,6 +342,7 @@
 static const luaL_Reg list_funcs[] = {
   {"__concat", list_concat},
   {"__eq", list_eq},
+  {"__tostring", list_tostring},
   {"clone", list_clone},
   {"extend", list_extend},
   {"filter", list_filter},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/hslua-list.cabal 
new/hslua-list-1.1.1/hslua-list.cabal
--- old/hslua-list-1.1.0.1/hslua-list.cabal     2001-09-09 03:46:40.000000000 
+0200
+++ new/hslua-list-1.1.1/hslua-list.cabal       2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 name:                hslua-list
-version:             1.1.0.1
+version:             1.1.1
 synopsis:            Opinionated, but extensible Lua list type.
 description:         List type for Lua, with a Haskell interface.
 homepage:            https://hslua.org/
@@ -8,8 +8,8 @@
 license:             MIT
 license-file:        LICENSE
 author:              Albert Krewinkel
-maintainer:          Albert Krewinkel <[email protected]>
-copyright:           © 2022 Albert Krewinkel
+maintainer:          Albert Krewinkel <[email protected]>
+copyright:           © 2022-2023 Albert Krewinkel
 category:            Foreign
 build-type:          Simple
 extra-doc-files:     README.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/src/HsLua/List.hs 
new/hslua-list-1.1.1/src/HsLua/List.hs
--- old/hslua-list-1.1.0.1/src/HsLua/List.hs    2001-09-09 03:46:40.000000000 
+0200
+++ new/hslua-list-1.1.1/src/HsLua/List.hs      2001-09-09 03:46:40.000000000 
+0200
@@ -1,8 +1,8 @@
 {-# LANGUAGE LambdaCase           #-}
 {- |
-Copyright  : © 2021-2022 Albert Krewinkel
+Copyright  : © 2021-2023 Albert Krewinkel
 License    : MIT
-Maintainer : Albert Krewinkel <[email protected]>
+Maintainer : Albert Krewinkel <[email protected]>
 
 Lua lists with additional methods.
 -}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/test/test-hslua-list.hs 
new/hslua-list-1.1.1/test/test-hslua-list.hs
--- old/hslua-list-1.1.0.1/test/test-hslua-list.hs      2001-09-09 
03:46:40.000000000 +0200
+++ new/hslua-list-1.1.1/test/test-hslua-list.hs        2001-09-09 
03:46:40.000000000 +0200
@@ -3,9 +3,9 @@
 {-# LANGUAGE TypeApplications    #-}
 {-|
 Module      : Main
-Copyright   : © 2021-2022 Albert Krewinkel
+Copyright   : © 2021-2023 Albert Krewinkel
 License     : MIT
-Maintainer  : Albert Krewinkel <[email protected]>
+Maintainer  : Albert Krewinkel <[email protected]>
 
 Tests for the list type.
 -}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hslua-list-1.1.0.1/test/test-list.lua 
new/hslua-list-1.1.1/test/test-list.lua
--- old/hslua-list-1.1.0.1/test/test-list.lua   2001-09-09 03:46:40.000000000 
+0200
+++ new/hslua-list-1.1.1/test/test-list.lua     2001-09-09 03:46:40.000000000 
+0200
@@ -312,6 +312,20 @@
           "abc"
         )
       end),
+    },
+    group 'tostring' {
+      test('lists all elements', function ()
+        assert.are_equal(
+          tostring(List {5, 23, 42}),
+          'List {5, 23, 42}'
+        )
+      end),
+      test('empty list', function ()
+        assert.are_equal(
+          tostring(List {}),
+          'List {}'
+        )
+      end),
     }
   },
 }

Reply via email to