Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-concurrent-output for 
openSUSE:Factory checked in at 2023-09-04 22:53:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-concurrent-output (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-concurrent-output.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-concurrent-output"

Mon Sep  4 22:53:44 2023 rev:9 rq:1108864 version:1.10.19

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-concurrent-output/ghc-concurrent-output.changes  
    2023-06-22 23:25:41.101726505 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-concurrent-output.new.1766/ghc-concurrent-output.changes
    2023-09-04 22:54:29.721704187 +0200
@@ -1,0 +2,10 @@
+Wed Aug 30 20:04:13 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Update concurrent-output to version 1.10.19.
+  concurrent-output (1.10.19) unstable; urgency=medium
+
+    * Support building for WASM.
+
+   -- Joey Hess <i...@joeyh.name>  Wed, 30 Aug 2023 16:03:03 -0400
+
+-------------------------------------------------------------------

Old:
----
  concurrent-output-1.10.18.tar.gz

New:
----
  concurrent-output-1.10.19.tar.gz

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

Other differences:
------------------
++++++ ghc-concurrent-output.spec ++++++
--- /var/tmp/diff_new_pack.1xD6gI/_old  2023-09-04 22:54:30.693738547 +0200
+++ /var/tmp/diff_new_pack.1xD6gI/_new  2023-09-04 22:54:30.697738689 +0200
@@ -19,7 +19,7 @@
 %global pkg_name concurrent-output
 %global pkgver %{pkg_name}-%{version}
 Name:           ghc-%{pkg_name}
-Version:        1.10.18
+Version:        1.10.19
 Release:        0
 Summary:        Ungarble output from several threads or commands
 License:        BSD-2-Clause

++++++ concurrent-output-1.10.18.tar.gz -> concurrent-output-1.10.19.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/concurrent-output-1.10.18/CHANGELOG 
new/concurrent-output-1.10.19/CHANGELOG
--- old/concurrent-output-1.10.18/CHANGELOG     2001-09-09 03:46:40.000000000 
+0200
+++ new/concurrent-output-1.10.19/CHANGELOG     2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,9 @@
+concurrent-output (1.10.19) unstable; urgency=medium
+
+  * Support building for WASM.
+
+ -- Joey Hess <i...@joeyh.name>  Wed, 30 Aug 2023 16:03:03 -0400
+
 concurrent-output (1.10.18) unstable; urgency=medium
 
   * Avoid some build warnings on Windows.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/concurrent-output-1.10.18/System/Console/Regions.hs 
new/concurrent-output-1.10.19/System/Console/Regions.hs
--- old/concurrent-output-1.10.18/System/Console/Regions.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/concurrent-output-1.10.19/System/Console/Regions.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -126,17 +126,19 @@
 import Control.Concurrent.STM.TSem
 import Control.Concurrent.Async
 import System.Console.ANSI
-import qualified System.Console.Terminal.Size as Console
 import System.IO
 import System.IO.Unsafe (unsafePerformIO)
 import Text.Read
 import Data.List (intercalate, nubBy)
+import Control.Applicative
+import Prelude
+#ifdef VERSION_terminal_size
+import qualified System.Console.Terminal.Size as Console
 #ifndef mingw32_HOST_OS
 import System.Posix.Signals
 import System.Posix.Signals.Exts
 #endif
-import Control.Applicative
-import Prelude
+#endif
 
 import System.Console.Concurrent
 import Utility.Monad
@@ -182,22 +184,26 @@
 regionList :: TMVar [ConsoleRegion]
 regionList = unsafePerformIO newEmptyTMVarIO
 
--- | On Unix systems, this TVar is automatically updated when the
--- terminal is resized. On Windows, it is only initialized on program start
--- with the current terminal size.
+data ConsoleSize = ConsoleSize
+       { _consoleHeight :: Int
+       , _consoleWidth :: Int
+       }
+
 {-# NOINLINE consoleSize #-}
-consoleSize :: TVar (Console.Window Int)
-consoleSize = unsafePerformIO $ newTVarIO $ 
-       Console.Window { Console.width = 80, Console.height = 25}
+consoleSize :: TVar ConsoleSize
+consoleSize = unsafePerformIO $ newTVarIO $
+       ConsoleSize { _consoleWidth = 80, _consoleHeight = 25}
 
 type Width = Int
 
 -- | Gets the width of the console.
 --
 -- On Unix, this is automatically updated when the terminal is resized.
--- On Windows, it is only initialized on program start.
+-- On Windows, it is determined at start. On WASM,
+-- the console width is hard coded to 80 since WASI does not provide a way
+-- to determine it.
 consoleWidth :: STM Int
-consoleWidth = munge . Console.width <$> readTVar consoleSize
+consoleWidth = munge . _consoleWidth <$> readTVar consoleSize
   where
 #ifndef mingw32_HOST_OS
        munge = id
@@ -208,8 +214,13 @@
 #endif
 
 -- | Get the height of the console.
+--
+-- On Unix, this is automatically updated when the terminal is resized.
+-- On Windows, it is determined at start. On WASM,
+-- the console heigth is hard coded to 25 since WASI does not provide a way
+-- to determine it.
 consoleHeight :: STM Int
-consoleHeight = Console.height <$> readTVar consoleSize
+consoleHeight = _consoleHeight <$> readTVar consoleSize
 
 -- | Check if `displayConsoleRegions` is running.
 regionDisplayEnabled :: IO Bool
@@ -453,11 +464,20 @@
                        installResizeHandler Nothing
 
 trackConsoleWidth :: IO ()
+#ifdef VERSION_terminal_size
 trackConsoleWidth = do
-       let getsz = maybe noop (atomically . writeTVar consoleSize)
+       let getsz = maybe noop (atomically . writeTVar consoleSize . conv)
                =<< Console.size
        getsz
        installResizeHandler (Just getsz)
+  where
+       conv wsz = ConsoleSize
+               { _consoleWidth = Console.width wsz
+               , _consoleHeight = Console.height wsz
+               }
+#else
+trackConsoleWidth = return ()
+#endif
 
 data DisplayChange
        = BufferChange BufferSnapshot 
@@ -694,11 +714,15 @@
 
 installResizeHandler :: Maybe (IO ()) -> IO ()
 #ifndef mingw32_HOST_OS
+#ifdef VERSION_terminal_size
 installResizeHandler h = void $
        installHandler windowChange (maybe Default Catch h) Nothing
 #else
 installResizeHandler _ = return ()
 #endif
+#else
+installResizeHandler _ = return ()
+#endif
 
 calcRegionLines :: R -> Width -> STM [Text]
 calcRegionLines r width = do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/concurrent-output-1.10.18/concurrent-output.cabal 
new/concurrent-output-1.10.19/concurrent-output.cabal
--- old/concurrent-output-1.10.18/concurrent-output.cabal       2001-09-09 
03:46:40.000000000 +0200
+++ new/concurrent-output-1.10.19/concurrent-output.cabal       2001-09-09 
03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 Name: concurrent-output
-Version: 1.10.18
+Version: 1.10.19
 Cabal-Version: >= 1.10
 License: BSD2
 Maintainer: Joey Hess <i...@joeyh.name>
@@ -40,7 +40,6 @@
     , transformers (>= 0.3.0 && < 0.7.0)
     , exceptions (>= 0.6.0 && < 0.11.0)
     , ansi-terminal (>= 0.6.2 && < 1.1.0)
-    , terminal-size (>= 0.3.0 && < 0.4.0)
   Exposed-Modules:
     System.Console.Concurrent
     System.Console.Concurrent.Internal
@@ -52,6 +51,8 @@
 
   if (! os(Windows))
     Build-Depends: unix (>= 2.7.0 && < 2.9.0)
+  if (! arch(wasm32))
+    Build-Depends: terminal-size (>= 0.3.0 && < 0.4.0)
 
 source-repository head
   type: git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/concurrent-output-1.10.18/demo2.hs 
new/concurrent-output-1.10.19/demo2.hs
--- old/concurrent-output-1.10.18/demo2.hs      2001-09-09 03:46:40.000000000 
+0200
+++ new/concurrent-output-1.10.19/demo2.hs      2001-09-09 03:46:40.000000000 
+0200
@@ -1,21 +1,16 @@
 import Control.Concurrent.Async
 import Control.Concurrent
-import System.Console.Concurrent
 import System.Console.Regions
-import System.Console.Terminal.Size
-import qualified Data.Text as T
-import Control.Concurrent.STM
-import Control.Applicative
-import Data.Time.Clock
 import Control.Monad
 
-main = displayConsoleRegions $ mapConcurrently id
+main :: IO ()
+main = displayConsoleRegions $ void $ mapConcurrently id
        [ spinner 100 1 "Pinwheels!!" setConsoleRegion "/-\\|" (withtitle 1)
        , spinner 100 1 "Bubbles!!!!" setConsoleRegion ".oOo." (withtitle 1)
        , spinner 100 1 "Dots......!" appendConsoleRegion "."  (const (take 3))
        , spinner  30 2 "KleisiFish?" setConsoleRegion "  <=<   <=<  " 
(withtitle 10)
        , spinner  10 9 "Countdowns!" setConsoleRegion
-               (reverse [1..10])
+               (reverse ([1..10] :: [Int]))
                (\t n -> t ++ show (head n))
        ]
   where

Reply via email to