Hello community,
here is the log from the commit of package ghc-streaming-commons for
openSUSE:Leap:15.2 checked in at 2020-02-19 18:41:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ghc-streaming-commons (Old)
and /work/SRC/openSUSE:Leap:15.2/.ghc-streaming-commons.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-streaming-commons"
Wed Feb 19 18:41:22 2020 rev:13 rq:771472 version:0.2.1.2
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/ghc-streaming-commons/ghc-streaming-commons.changes
2020-01-15 15:02:39.261817276 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.ghc-streaming-commons.new.26092/ghc-streaming-commons.changes
2020-02-19 18:41:23.210203267 +0100
@@ -1,0 +2,23 @@
+Mon Jan 6 09:54:59 UTC 2020 - [email protected]
+
+- Update streaming-commons to version 0.2.1.2.
+ ## 0.2.1.2
+
+ * Update `defaultReadBufferSize` to use system default instead of hardcoded
value [#54](https://github.com/fpco/streaming-commons/issues/54)
+
+-------------------------------------------------------------------
+Fri Nov 8 16:14:51 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------
+Thu Jun 6 02:01:25 UTC 2019 - [email protected]
+
+- Update streaming-commons to version 0.2.1.1.
+ # ChangeLog for streaming-commons
+
+ ## 0.2.1.1
+
+ * Fix a failing test case (invalid `ByteString` copying), does not affect
library itself
+
+-------------------------------------------------------------------
Old:
----
streaming-commons-0.2.1.0.tar.gz
New:
----
streaming-commons-0.2.1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-streaming-commons.spec ++++++
--- /var/tmp/diff_new_pack.hmY4tc/_old 2020-02-19 18:41:23.618203768 +0100
+++ /var/tmp/diff_new_pack.hmY4tc/_new 2020-02-19 18:41:23.622203773 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-streaming-commons
#
-# Copyright (c) 2018 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,11 +19,10 @@
%global pkg_name streaming-commons
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.2.1.0
+Version: 0.2.1.2
Release: 0
Summary: Common lower-level functions needed by various streaming data
libraries
License: MIT
-Group: Development/Libraries/Haskell
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
@@ -52,7 +51,6 @@
%package devel
Summary: Haskell %{pkg_name} library development files
-Group: Development/Libraries/Haskell
Requires: %{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
++++++ streaming-commons-0.2.1.0.tar.gz -> streaming-commons-0.2.1.2.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.2.1.0/ChangeLog.md
new/streaming-commons-0.2.1.2/ChangeLog.md
--- old/streaming-commons-0.2.1.0/ChangeLog.md 2018-06-27 09:12:16.000000000
+0200
+++ new/streaming-commons-0.2.1.2/ChangeLog.md 2020-01-05 13:26:59.000000000
+0100
@@ -1,3 +1,13 @@
+# ChangeLog for streaming-commons
+
+## 0.2.1.2
+
+* Update `defaultReadBufferSize` to use system default instead of hardcoded
value [#54](https://github.com/fpco/streaming-commons/issues/54)
+
+## 0.2.1.1
+
+* Fix a failing test case (invalid `ByteString` copying), does not affect
library itself
+
## 0.2.1.0
* Change `bindRandomPortGen` to use binding to port 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.2.1.0/Data/Streaming/Network.hs
new/streaming-commons-0.2.1.2/Data/Streaming/Network.hs
--- old/streaming-commons-0.2.1.0/Data/Streaming/Network.hs 2018-06-27
09:10:50.000000000 +0200
+++ new/streaming-commons-0.2.1.2/Data/Streaming/Network.hs 2020-01-05
13:26:59.000000000 +0100
@@ -94,7 +94,7 @@
import qualified Network.Socket as NS
import Data.Streaming.Network.Internal
import Control.Concurrent (threadDelay)
-import Control.Exception (IOException, try, SomeException, throwIO,
bracketOnError)
+import Control.Exception (IOException, try, SomeException, throwIO,
bracketOnError, bracket)
import Network.Socket (Socket, AddrInfo, SocketType)
import Network.Socket.ByteString (recv, sendAll)
import System.IO.Error (isDoesNotExistError)
@@ -108,7 +108,7 @@
import Control.Monad (forever)
import Data.IORef (IORef, newIORef, atomicModifyIORef)
import Data.Array.Unboxed ((!), UArray, listArray)
-import System.IO.Unsafe (unsafePerformIO)
+import System.IO.Unsafe (unsafePerformIO, unsafeDupablePerformIO)
import System.Random (randomRIO)
import System.IO.Error (isFullErrorType, ioeGetErrorType)
#if WINDOWS
@@ -200,9 +200,6 @@
-- | Bind to a random port number. Especially useful for writing network tests.
--
--- This will attempt 30 different port numbers before giving up and throwing an
--- exception.
---
-- Since 0.1.1
bindRandomPortGen :: SocketType -> HostPreference -> IO (Int, Socket)
bindRandomPortGen sockettype s = do
@@ -266,8 +263,10 @@
bindRandomPortUDP :: HostPreference -> IO (Int, Socket)
bindRandomPortUDP = bindRandomPortGen NS.Datagram
+{-# NOINLINE defaultReadBufferSize #-}
defaultReadBufferSize :: Int
-defaultReadBufferSize = 32768
+defaultReadBufferSize = unsafeDupablePerformIO $
+ bracket (NS.socket NS.AF_INET NS.Stream 0) NS.close (\sock ->
NS.getSocketOption sock NS.RecvBuffer)
#if !WINDOWS
-- | Attempt to connect to the given Unix domain socket path.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.2.1.0/README.md
new/streaming-commons-0.2.1.2/README.md
--- old/streaming-commons-0.2.1.0/README.md 2018-01-31 16:13:39.000000000
+0100
+++ new/streaming-commons-0.2.1.2/README.md 2020-01-05 07:08:47.000000000
+0100
@@ -4,8 +4,7 @@
Common lower-level functions needed by various streaming data libraries.
Intended to be shared by libraries like conduit and pipes.
-[](https://travis-ci.org/fpco/streaming-commons)
-[](https://ci.appveyor.com/project/snoyberg/streaming-commons/branch/master)
+[](https://dev.azure.com/fpco/streaming-commons/_build/latest?definitionId=2&branchName=master)
Dependencies
------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.2.1.0/cbits/text-helper.c
new/streaming-commons-0.2.1.2/cbits/text-helper.c
--- old/streaming-commons-0.2.1.0/cbits/text-helper.c 2015-11-24
11:15:28.000000000 +0100
+++ new/streaming-commons-0.2.1.2/cbits/text-helper.c 2019-06-05
14:56:43.000000000 +0200
@@ -14,13 +14,17 @@
void _hs_streaming_commons_memcpy(void *dest, size_t doff, const void *src,
size_t soff,
size_t n)
{
- memcpy(dest + (doff<<1), src + (soff<<1), n<<1);
+ char *cdest = dest;
+ const char *csrc = src;
+ memcpy(cdest + (doff<<1), csrc + (soff<<1), n<<1);
}
int _hs_streaming_commons_memcmp(const void *a, size_t aoff, const void *b,
size_t boff,
size_t n)
{
- return memcmp(a + (aoff<<1), b + (boff<<1), n<<1);
+ const char *ca = a;
+ const char *cb = b;
+ return memcmp(ca + (aoff<<1), cb + (boff<<1), n<<1);
}
#define UTF8_ACCEPT 0
@@ -68,8 +72,8 @@
* an UTF16 array
*/
void
-_hs_streaming_commons_decode_latin1(uint16_t *dest, const uint8_t const *src,
- const uint8_t const *srcend)
+_hs_streaming_commons_decode_latin1(uint16_t *dest, const uint8_t *src,
+ const uint8_t *srcend)
{
const uint8_t *p = src;
@@ -130,14 +134,14 @@
#if defined(__GNUC__) || defined(__clang__)
static inline uint8_t const *
_hs_streaming_commons_decode_utf8_int(uint16_t *const dest, size_t *destoff,
- const uint8_t const **src, const uint8_t const *srcend,
+ const uint8_t **src, const uint8_t *srcend,
uint32_t *codepoint0, uint32_t *state0)
__attribute((always_inline));
#endif
static inline uint8_t const *
_hs_streaming_commons_decode_utf8_int(uint16_t *const dest, size_t *destoff,
- const uint8_t const **src, const uint8_t const *srcend,
+ const uint8_t **src, const uint8_t *srcend,
uint32_t *codepoint0, uint32_t *state0)
{
uint16_t *d = dest + *destoff;
@@ -158,7 +162,7 @@
if (state == UTF8_ACCEPT) {
while (s < srcend - 4) {
- codepoint = *((uint32_t *) s);
+ codepoint = *((const uint32_t *) s);
if ((codepoint & 0x80808080) != 0)
break;
s += 4;
@@ -202,8 +206,8 @@
uint8_t const *
_hs_streaming_commons_decode_utf8_state(uint16_t *const dest, size_t *destoff,
- const uint8_t const **src,
- const uint8_t const *srcend,
+ const uint8_t **src,
+ const uint8_t *srcend,
uint32_t *codepoint0, uint32_t *state0)
{
uint8_t const *ret = _hs_streaming_commons_decode_utf8_int(dest, destoff,
src, srcend,
@@ -243,7 +247,7 @@
ascii:
#if defined(__x86_64__)
while (srcend - src >= 4) {
- uint64_t w = *((uint64_t *) src);
+ uint64_t w = *((const uint64_t *) src);
if (w & 0xFF80FF80FF80FF80ULL) {
if (!(w & 0x000000000000FF80ULL)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.2.1.0/cbits/zlib-helper.c
new/streaming-commons-0.2.1.2/cbits/zlib-helper.c
--- old/streaming-commons-0.2.1.0/cbits/zlib-helper.c 2015-11-24
11:15:28.000000000 +0100
+++ new/streaming-commons-0.2.1.2/cbits/zlib-helper.c 2019-06-05
14:56:43.000000000 +0200
@@ -27,14 +27,14 @@
return deflateInit2(stream, level, Z_DEFLATED, methodBits, memlevel,
strategy);
}
-int streaming_commons_inflate_set_dictionary(z_stream *stream, const char*
dictionary,
+int streaming_commons_inflate_set_dictionary(z_stream *stream, const char*
dictionary,
unsigned int dictLength) {
- return inflateSetDictionary(stream, dictionary, dictLength);
+ return inflateSetDictionary(stream, (const Bytef *)dictionary,
dictLength);
}
-int streaming_commons_deflate_set_dictionary(z_stream *stream, const char*
dictionary,
+int streaming_commons_deflate_set_dictionary(z_stream *stream, const char*
dictionary,
unsigned int dictLength) {
- return deflateSetDictionary(stream, dictionary, dictLength);
+ return deflateSetDictionary(stream, (const Bytef *)dictionary,
dictLength);
}
void streaming_commons_free_z_stream_inflate (z_stream *stream)
@@ -45,13 +45,13 @@
void streaming_commons_set_avail_in (z_stream *stream, char *buff, unsigned
int avail)
{
- stream->next_in = buff;
+ stream->next_in = (Bytef *)buff;
stream->avail_in = avail;
}
void streaming_commons_set_avail_out (z_stream *stream, char *buff, unsigned
int avail)
{
- stream->next_out = buff;
+ stream->next_out = (Bytef *)buff;
stream->avail_out = avail;
}
@@ -72,7 +72,7 @@
char* streaming_commons_get_next_in (z_stream *stream)
{
- return stream->next_in;
+ return (char *)stream->next_in;
}
void streaming_commons_free_z_stream_deflate (z_stream *stream)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.2.1.0/streaming-commons.cabal
new/streaming-commons-0.2.1.2/streaming-commons.cabal
--- old/streaming-commons-0.2.1.0/streaming-commons.cabal 2018-06-27
09:12:13.000000000 +0200
+++ new/streaming-commons-0.2.1.2/streaming-commons.cabal 2020-01-05
13:26:59.000000000 +0100
@@ -1,5 +1,5 @@
name: streaming-commons
-version: 0.2.1.0
+version: 0.2.1.2
synopsis: Common lower-level functions needed by various streaming
data libraries
description: Provides low-dependency functionality commonly needed by
various streaming data libraries, such as conduit and pipes.
homepage: https://github.com/fpco/streaming-commons
@@ -45,7 +45,7 @@
Data.Text.Internal.Encoding.Utf16
Data.Text.Internal.Encoding.Utf32
- build-depends: base >= 4.7 && < 5
+ build-depends: base >= 4.8 && < 5
, array
, async
, bytestring
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/streaming-commons-0.2.1.0/test/Data/Streaming/ByteString/BuilderSpec.hs
new/streaming-commons-0.2.1.2/test/Data/Streaming/ByteString/BuilderSpec.hs
--- old/streaming-commons-0.2.1.0/test/Data/Streaming/ByteString/BuilderSpec.hs
2018-06-27 09:09:10.000000000 +0200
+++ new/streaming-commons-0.2.1.2/test/Data/Streaming/ByteString/BuilderSpec.hs
2019-06-05 14:57:19.000000000 +0200
@@ -7,7 +7,6 @@
import qualified Data.ByteString as S
import Data.ByteString.Char8 ()
-import qualified Data.ByteString.Unsafe as S
import qualified Data.ByteString.Builder as B
import Data.ByteString.Builder (Builder)
import qualified Data.ByteString.Builder.Internal as B
@@ -107,12 +106,20 @@
builderSpec
- prop "toByteStringIO idempotent to toLazyByteString" $ \bss' -> do
+ let prop_idempotent i bss' = do
let bss = mconcat (map (B.byteString . S.pack) bss')
ior <- newIORef []
toByteStringIOWith 16
- (\s -> do s' <- S.useAsCStringLen s
S.unsafePackCStringLen
- modifyIORef ior (s' :))
+ (\s -> do let s' = S.copy s
+ s' `seq` modifyIORef ior (s' :))
bss
chunks <- readIORef ior
- L.fromChunks (reverse chunks) `shouldBe` B.toLazyByteString bss
+ let have = L.unpack (L.fromChunks (reverse chunks))
+ want = L.unpack (B.toLazyByteString bss)
+ (i, have) `shouldBe` (i, want)
+
+ prop "toByteStringIO idempotent to toLazyByteString" (prop_idempotent
(0::Int))
+
+ it "toByteStringIO idempotent to toLazyBytestring, specific case" $ do
+ let bss' = replicate 10 [0..255]
+ mapM_ (\i -> prop_idempotent i bss') [(1::Int)..100]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/streaming-commons-0.2.1.0/test/Data/Streaming/NetworkSpec.hs
new/streaming-commons-0.2.1.2/test/Data/Streaming/NetworkSpec.hs
--- old/streaming-commons-0.2.1.0/test/Data/Streaming/NetworkSpec.hs
2016-09-19 14:29:36.000000000 +0200
+++ new/streaming-commons-0.2.1.2/test/Data/Streaming/NetworkSpec.hs
2020-01-05 13:26:59.000000000 +0100
@@ -14,6 +14,10 @@
spec :: Spec
spec = do
+ describe "getDefaultReadBufferSize" $ do
+ it "sanity" $ do
+ getReadBufferSize (clientSettingsTCP 8080 "localhost") >= 4096
`shouldBe` True
+
describe "getUnassignedPort" $ do
it "sanity" $ replicateM_ 100000 $ do
port <- getUnassignedPort