Hello community,
here is the log from the commit of package ghc-concurrent-output for
openSUSE:Factory checked in at 2016-05-17 17:14:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-concurrent-output (Old)
and /work/SRC/openSUSE:Factory/.ghc-concurrent-output.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-concurrent-output"
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-concurrent-output/ghc-concurrent-output.changes
2016-05-03 09:36:24.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-concurrent-output.new/ghc-concurrent-output.changes
2016-05-17 17:14:30.000000000 +0200
@@ -1,0 +2,12 @@
+Wed May 11 15:09:45 UTC 2016 - [email protected]
+
+- update to 1.7.6
+* Update transformers dep to allow 0.5.
+
+-------------------------------------------------------------------
+Mon May 2 10:02:55 UTC 2016 - [email protected]
+
+- update to 1.7.5
+* createProcessConcurrent and System.Process.Concurrent are now available on
Windows
+
+-------------------------------------------------------------------
Old:
----
concurrent-output-1.7.4.tar.gz
New:
----
concurrent-output-1.7.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-concurrent-output.spec ++++++
--- /var/tmp/diff_new_pack.Zc1ti2/_old 2016-05-17 17:14:31.000000000 +0200
+++ /var/tmp/diff_new_pack.Zc1ti2/_new 2016-05-17 17:14:31.000000000 +0200
@@ -18,7 +18,7 @@
%global pkg_name concurrent-output
Name: ghc-%{pkg_name}
-Version: 1.7.4
+Version: 1.7.6
Release: 0
Summary: Ungarble output from several threads or commands
License: BSD-2-Clause
++++++ concurrent-output-1.7.4.tar.gz -> concurrent-output-1.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/concurrent-output-1.7.4/CHANGELOG
new/concurrent-output-1.7.6/CHANGELOG
--- old/concurrent-output-1.7.4/CHANGELOG 2016-03-12 18:18:30.000000000
+0100
+++ new/concurrent-output-1.7.6/CHANGELOG 2016-05-02 14:01:38.000000000
+0200
@@ -1,3 +1,16 @@
+concurrent-output (1.7.6) unstable; urgency=medium
+
+ * Update transformers dep to allow 0.5.
+
+ -- Joey Hess <[email protected]> Mon, 02 May 2016 08:01:20 -0400
+
+concurrent-output (1.7.5) unstable; urgency=medium
+
+ * createProcessConcurrent and System.Process.Concurrent are
+ now available on Windows.
+
+ -- Joey Hess <[email protected]> Sun, 01 May 2016 19:40:38 -0400
+
concurrent-output (1.7.4) unstable; urgency=medium
* Update process dep to allow 1.4.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/concurrent-output-1.7.4/System/Console/Concurrent/Internal.hs
new/concurrent-output-1.7.6/System/Console/Concurrent/Internal.hs
--- old/concurrent-output-1.7.4/System/Console/Concurrent/Internal.hs
2016-03-12 18:18:30.000000000 +0100
+++ new/concurrent-output-1.7.6/System/Console/Concurrent/Internal.hs
2016-05-02 14:01:38.000000000 +0200
@@ -1,5 +1,7 @@
{-# LANGUAGE BangPatterns, TypeSynonymInstances, FlexibleInstances,
TupleSections #-}
-{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -O2 #-}
+{- Building this module with -O0 causes streams not to fuse and too much
+ - memory to be used. -}
-- |
-- Copyright: 2015 Joey Hess <[email protected]>
@@ -12,9 +14,6 @@
module System.Console.Concurrent.Internal where
import System.IO
-#ifndef mingw32_HOST_OS
-import System.Posix.IO
-#endif
import System.Directory
import System.Exit
import Control.Monad
@@ -258,7 +257,6 @@
-- as the output lock becomes free.
--
-- Currently only available on Unix systems, not Windows.
-#ifndef mingw32_HOST_OS
createProcessConcurrent :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle,
Maybe Handle, ConcurrentProcessHandle)
createProcessConcurrent p
| willOutput (P.std_out p) || willOutput (P.std_err p) =
@@ -271,7 +269,6 @@
asyncProcessWaiter $
void $ tryIO $ P.waitForProcess h
return (toConcurrentProcessHandle r)
-#endif
-- | Wrapper around `System.Process.createProcess` that makes sure a process
-- is run in the foreground, with direct access to stdout and stderr.
@@ -293,31 +290,33 @@
dropOutputLock
return (toConcurrentProcessHandle r)
-#ifndef mingw32_HOST_OS
bgProcess :: P.CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle,
ConcurrentProcessHandle)
bgProcess p = do
- (toouth, fromouth) <- pipe
- (toerrh, fromerrh) <- pipe
let p' = p
- { P.std_out = rediroutput (P.std_out p) toouth
- , P.std_err = rediroutput (P.std_err p) toerrh
+ { P.std_out = rediroutput (P.std_out p)
+ , P.std_err = rediroutput (P.std_err p)
}
registerOutputThread
- r@(_, _, _, h) <- P.createProcess p'
+ (stdin_h, stdout_h, stderr_h, h) <- P.createProcess p'
`onException` unregisterOutputThread
+ let r =
+ ( stdin_h
+ , mungeret (P.std_out p) stdout_h
+ , mungeret (P.std_err p) stderr_h
+ , h
+ )
asyncProcessWaiter $ void $ tryIO $ P.waitForProcess h
- outbuf <- setupOutputBuffer StdOut toouth (P.std_out p) fromouth
- errbuf <- setupOutputBuffer StdErr toerrh (P.std_err p) fromerrh
+ outbuf <- setupOutputBuffer StdOut stdout_h
+ errbuf <- setupOutputBuffer StdErr stderr_h
void $ async $ bufferWriter [outbuf, errbuf]
return (toConcurrentProcessHandle r)
where
- pipe = do
- (from, to) <- createPipe
- (,) <$> fdToHandle to <*> fdToHandle from
- rediroutput ss h
- | willOutput ss = P.UseHandle h
+ rediroutput ss
+ | willOutput ss = P.CreatePipe
| otherwise = ss
-#endif
+ mungeret ss mh
+ | willOutput ss = Nothing
+ | otherwise = mh
willOutput :: P.StdStream -> Bool
willOutput P.Inherit = True
@@ -350,32 +349,31 @@
data BufSig = BufSig
-setupOutputBuffer :: StdHandle -> Handle -> P.StdStream -> Handle -> IO
(StdHandle, MVar OutputBuffer, TMVar BufSig, TMVar AtEnd)
-setupOutputBuffer h toh ss fromh = do
- hClose toh
+setupOutputBuffer :: StdHandle -> Maybe Handle -> IO (StdHandle, MVar
OutputBuffer, TMVar BufSig, TMVar AtEnd)
+setupOutputBuffer h fromh = do
buf <- newMVar (OutputBuffer [])
bufsig <- atomically newEmptyTMVar
bufend <- atomically newEmptyTMVar
- void $ async $ outputDrainer ss fromh buf bufsig bufend
+ void $ async $ outputDrainer fromh buf bufsig bufend
return (h, buf, bufsig, bufend)
-- Drain output from the handle, and buffer it.
-outputDrainer :: P.StdStream -> Handle -> MVar OutputBuffer -> TMVar BufSig ->
TMVar AtEnd -> IO ()
-outputDrainer ss fromh buf bufsig bufend
- | willOutput ss = go
- | otherwise = atend
+outputDrainer :: Maybe Handle -> MVar OutputBuffer -> TMVar BufSig -> TMVar
AtEnd -> IO ()
+outputDrainer mfromh buf bufsig bufend = case mfromh of
+ Nothing -> atend
+ Just fromh -> go fromh
where
- go = do
+ go fromh = do
t <- T.hGetChunk fromh
if T.null t
- then atend
+ then do
+ atend
+ hClose fromh
else do
modifyMVar_ buf $ addOutputBuffer (Output t)
changed
- go
- atend = do
- atomically $ putTMVar bufend AtEnd
- hClose fromh
+ go fromh
+ atend = atomically $ putTMVar bufend AtEnd
changed = atomically $ do
void $ tryTakeTMVar bufsig
putTMVar bufsig BufSig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/concurrent-output-1.7.4/System/Console/Regions.hs
new/concurrent-output-1.7.6/System/Console/Regions.hs
--- old/concurrent-output-1.7.4/System/Console/Regions.hs 2016-03-12
18:18:30.000000000 +0100
+++ new/concurrent-output-1.7.6/System/Console/Regions.hs 2016-05-02
14:01:38.000000000 +0200
@@ -1,5 +1,8 @@
{-# LANGUAGE BangPatterns, TypeSynonymInstances, FlexibleInstances #-}
{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -O2 #-}
+{- This module does a lot of calculation that can be expensive, so optimise
+ - it well -}
-- |
-- Copyright: 2015 Joey Hess <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/concurrent-output-1.7.4/System/Process/Concurrent.hs
new/concurrent-output-1.7.6/System/Process/Concurrent.hs
--- old/concurrent-output-1.7.4/System/Process/Concurrent.hs 2016-03-12
18:18:30.000000000 +0100
+++ new/concurrent-output-1.7.6/System/Process/Concurrent.hs 2016-05-02
14:01:38.000000000 +0200
@@ -5,8 +5,6 @@
-- The functions exported by this module are intended to be drop-in
-- replacements for those from System.Process, when converting a whole
-- program to use System.Console.Concurrent.
---
--- Not currently available on Windows.
module System.Process.Concurrent where
@@ -21,8 +19,6 @@
-- You should use the waitForProcess in this module on the resulting
-- ProcessHandle. Using System.Process.waitForProcess instead can have
-- mildly unexpected results.
---
--- Not available on Windows.
createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe
Handle, ProcessHandle)
createProcess p = do
(i, o, e, ConcurrentProcessHandle h) <- createProcessConcurrent p
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/concurrent-output-1.7.4/concurrent-output.cabal
new/concurrent-output-1.7.6/concurrent-output.cabal
--- old/concurrent-output-1.7.4/concurrent-output.cabal 2016-03-12
18:18:30.000000000 +0100
+++ new/concurrent-output-1.7.6/concurrent-output.cabal 2016-05-02
14:01:38.000000000 +0200
@@ -1,5 +1,5 @@
Name: concurrent-output
-Version: 1.7.4
+Version: 1.7.6
Cabal-Version: >= 1.8
License: BSD2
Maintainer: Joey Hess <[email protected]>
@@ -36,7 +36,7 @@
, stm (>= 2.0 && < 2.5)
, process (>= 1.1.0 && < 1.5.0)
, directory (>= 1.2.0 && < 1.3.0)
- , transformers (>= 0.3.0 && < 0.5.0)
+ , transformers (>= 0.3.0 && < 0.6.0)
, exceptions (>= 0.6.0 && < 0.9.0)
, ansi-terminal (>= 0.6.0 && < 0.7.0)
, terminal-size (>= 0.3.0 && < 0.4.0)
@@ -44,6 +44,7 @@
System.Console.Concurrent
System.Console.Concurrent.Internal
System.Console.Regions
+ System.Process.Concurrent
Other-Modules:
Utility.Monad
Utility.Data
@@ -51,7 +52,6 @@
if (! os(Windows))
Build-Depends: unix (>= 2.7.0 && < 2.8.0)
- Exposed-Modules: System.Process.Concurrent
source-repository head
type: git