Hello community,
here is the log from the commit of package ghc-conduit-extra for
openSUSE:Factory checked in at 2020-05-11 13:34:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-conduit-extra (Old)
and /work/SRC/openSUSE:Factory/.ghc-conduit-extra.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-conduit-extra"
Mon May 11 13:34:25 2020 rev:24 rq:801007 version:1.3.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-conduit-extra/ghc-conduit-extra.changes
2019-12-27 13:52:27.808620099 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-conduit-extra.new.2738/ghc-conduit-extra.changes
2020-05-11 13:35:17.584355292 +0200
@@ -1,0 +2,8 @@
+Wed May 6 06:54:14 UTC 2020 - [email protected]
+
+- Update conduit-extra to version 1.3.5.
+ ## 1.3.5
+
+ * Add `createSinkClose`
+
+-------------------------------------------------------------------
Old:
----
conduit-extra-1.3.4.tar.gz
New:
----
conduit-extra-1.3.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-conduit-extra.spec ++++++
--- /var/tmp/diff_new_pack.5r6wIo/_old 2020-05-11 13:35:18.252356693 +0200
+++ /var/tmp/diff_new_pack.5r6wIo/_new 2020-05-11 13:35:18.252356693 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-conduit-extra
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 conduit-extra
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.3.4
+Version: 1.3.5
Release: 0
Summary: Batteries included conduit: adapters for common libraries
License: MIT
++++++ conduit-extra-1.3.4.tar.gz -> conduit-extra-1.3.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/conduit-extra-1.3.4/ChangeLog.md
new/conduit-extra-1.3.5/ChangeLog.md
--- old/conduit-extra-1.3.4/ChangeLog.md 2019-07-03 07:29:45.000000000
+0200
+++ new/conduit-extra-1.3.5/ChangeLog.md 2020-03-18 09:08:22.000000000
+0100
@@ -1,5 +1,9 @@
# ChangeLog for conduit-extra
+## 1.3.5
+
+* Add `createSinkClose`
+
## 1.3.4
* Use `MonadUnliftIO`-generalized versions of `withProcess`-style functions
now provided by `typed-process`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/conduit-extra-1.3.4/Data/Conduit/Process/Typed.hs
new/conduit-extra-1.3.5/Data/Conduit/Process/Typed.hs
--- old/conduit-extra-1.3.4/Data/Conduit/Process/Typed.hs 2019-07-03
07:01:28.000000000 +0200
+++ new/conduit-extra-1.3.5/Data/Conduit/Process/Typed.hs 2020-03-19
08:39:46.000000000 +0100
@@ -5,6 +5,7 @@
module Data.Conduit.Process.Typed
( -- * Conduit specific stuff
createSink
+ , createSinkClose
, createSource
-- * Running a process with logging
, withLoggedProcess_
@@ -23,9 +24,13 @@
import Data.IORef (IORef, newIORef, readIORef, modifyIORef)
import Control.Exception (throwIO, catch)
import Control.Concurrent.Async (concurrently)
-import System.IO (hSetBuffering, BufferMode (NoBuffering))
+import System.IO (hSetBuffering, BufferMode (NoBuffering), hClose)
--- | Provide input to a process by writing to a conduit.
+-- | Provide input to a process by writing to a conduit. The sink provided here
+-- will leave the pipe to the child open after the stream ends. This allows the
+-- sink to be used multiple times, but may result in surprising behavior. You
+-- may prefer 'createSinkClose', see
+-- <https://github.com/snoyberg/conduit/issues/434>.
--
-- @since 1.2.1
createSink :: MonadIO m => StreamSpec 'STInput (ConduitM S.ByteString o m ())
@@ -33,6 +38,15 @@
(\h -> liftIO (hSetBuffering h NoBuffering) >> CB.sinkHandle h)
`fmap` createPipe
+-- | Like 'createSink', but closes the pipe to the child process as soon as it
+-- runs out of data.
+--
+-- @since 1.3.5
+createSinkClose :: MonadIO m => StreamSpec 'STInput (ConduitM S.ByteString o m
())
+createSinkClose =
+ (\h -> liftIO (hSetBuffering h NoBuffering) >> CB.sinkHandle h >> liftIO
(hClose h))
+ `fmap` createPipe
+
-- | Read output from a process by read from a conduit.
--
-- @since 1.2.1
@@ -56,26 +70,6 @@
)
`fmap` createPipe
--- | Same as 'P.withProcess', but generalized to 'MonadUnliftIO'.
---
--- @since 1.2.1
-withProcess
- :: MonadUnliftIO m
- => ProcessConfig stdin stdout stderr
- -> (Process stdin stdout stderr -> m a)
- -> m a
-withProcess pc f = withRunInIO $ \run -> P.withProcess pc (run . f)
-
--- | Same as 'P.withProcess_', but generalized to 'MonadUnliftIO'.
---
--- @since 1.2.1
-withProcess_
- :: MonadUnliftIO m
- => ProcessConfig stdin stdout stderr
- -> (Process stdin stdout stderr -> m a)
- -> m a
-withProcess_ pc f = withRunInIO $ \run -> P.withProcess_ pc (run . f)
-
-- | Run a process, throwing an exception on a failure exit code. This
-- will store all output from stdout and stderr in memory for better
-- error messages. Note that this will require unbounded memory usage,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/conduit-extra-1.3.4/conduit-extra.cabal
new/conduit-extra-1.3.5/conduit-extra.cabal
--- old/conduit-extra-1.3.4/conduit-extra.cabal 2019-07-03 07:29:20.000000000
+0200
+++ new/conduit-extra-1.3.5/conduit-extra.cabal 2020-03-18 09:08:25.000000000
+0100
@@ -1,5 +1,5 @@
Name: conduit-extra
-Version: 1.3.4
+Version: 1.3.5
Synopsis: Batteries included conduit: adapters for common libraries.
Description:
The conduit package itself maintains relative small dependencies. The
purpose of this package is to collect commonly used utility functions wrapping
other library dependencies, without depending on heavier-weight dependencies.
The basic idea is that this package should only depend on haskell-platform
packages and conduit.