Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-filepath-bytestring for 
openSUSE:Factory checked in at 2021-08-25 20:57:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-filepath-bytestring (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-filepath-bytestring.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-filepath-bytestring"

Wed Aug 25 20:57:27 2021 rev:5 rq:912745 version:1.4.2.1.8

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-filepath-bytestring/ghc-filepath-bytestring.changes
  2021-03-28 11:55:49.408195331 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-filepath-bytestring.new.1899/ghc-filepath-bytestring.changes
        2021-08-25 20:58:43.553120415 +0200
@@ -1,0 +2,17 @@
+Thu Aug 12 08:09:40 UTC 2021 - [email protected]
+
+- Update filepath-bytestring to version 1.4.2.1.8.
+  filepath-bytestring (1.4.2.1.8) unstable; urgency=medium
+
+    * Faster implementations of encodeFilePath and decodeFilePath.
+      They are approximately 2x and 3x as fast, respectively.
+    * encodeFilePath and decodeFilePath used to truncate at the first
+      NUL. The new implementations do not do this. Since unix filepaths
+      cannot contain NUL, this behavior change is can't cause any problems,
+      unless the functions are used for values that are not actually
+      valid filepaths.
+    * Support cabal bench to benchmark the library.
+
+   -- Joey Hess <[email protected]>  Wed, 11 Aug 2021 12:17:15 -0400
+
+-------------------------------------------------------------------

Old:
----
  filepath-bytestring-1.4.2.1.7.tar.gz

New:
----
  filepath-bytestring-1.4.2.1.8.tar.gz

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

Other differences:
------------------
++++++ ghc-filepath-bytestring.spec ++++++
--- /var/tmp/diff_new_pack.rAdqng/_old  2021-08-25 20:58:44.001119826 +0200
+++ /var/tmp/diff_new_pack.rAdqng/_new  2021-08-25 20:58:44.005119821 +0200
@@ -19,7 +19,7 @@
 %global pkg_name filepath-bytestring
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.4.2.1.7
+Version:        1.4.2.1.8
 Release:        0
 Summary:        Library for manipulating RawFilePaths in a cross platform way
 License:        BSD-3-Clause

++++++ filepath-bytestring-1.4.2.1.7.tar.gz -> 
filepath-bytestring-1.4.2.1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepath-bytestring-1.4.2.1.7/CHANGELOG 
new/filepath-bytestring-1.4.2.1.8/CHANGELOG
--- old/filepath-bytestring-1.4.2.1.7/CHANGELOG 2001-09-09 03:46:40.000000000 
+0200
+++ new/filepath-bytestring-1.4.2.1.8/CHANGELOG 2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,16 @@
+filepath-bytestring (1.4.2.1.8) unstable; urgency=medium
+
+  * Faster implementations of encodeFilePath and decodeFilePath.
+    They are approximately 2x and 3x as fast, respectively.
+  * encodeFilePath and decodeFilePath used to truncate at the first
+    NUL. The new implementations do not do this. Since unix filepaths
+    cannot contain NUL, this behavior change is can't cause any problems,
+    unless the functions are used for values that are not actually
+    valid filepaths.
+  * Support cabal bench to benchmark the library.
+
+ -- Joey Hess <[email protected]>  Wed, 11 Aug 2021 12:17:15 -0400
+
 filepath-bytestring (1.4.2.1.7) unstable; urgency=medium
 
   * Relax QuickCheck bounds to allow 2.14.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/filepath-bytestring-1.4.2.1.7/System/FilePath/Internal.hs 
new/filepath-bytestring-1.4.2.1.8/System/FilePath/Internal.hs
--- old/filepath-bytestring-1.4.2.1.7/System/FilePath/Internal.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/filepath-bytestring-1.4.2.1.8/System/FilePath/Internal.hs       
2001-09-09 03:46:40.000000000 +0200
@@ -136,6 +136,7 @@
 import Data.ByteString (ByteString)
 import qualified Data.ByteString as B
 import qualified Data.ByteString.Char8 as B8
+import Data.ByteString.Unsafe (unsafePackMallocCStringLen)
 import Data.Char(ord, chr, toUpper, toLower, isAsciiLower, isAsciiUpper)
 import Data.Maybe(isJust)
 import Data.Word(Word8)
@@ -174,13 +175,9 @@
 #ifdef mingw32_HOST_OS
 encodeFilePath = UTF8.fromString
 #else
-encodeFilePath = B.pack . map (fromIntegral . fromEnum) . encodeFilePath'
-
-{-# NOINLINE encodeFilePath' #-}
-encodeFilePath' :: FilePath -> String
-encodeFilePath' f = unsafePerformIO $ do
+encodeFilePath f = unsafePerformIO $ do
        enc <- Encoding.getFileSystemEncoding
-       GHC.withCString enc f (GHC.peekCString Encoding.char8)
+       GHC.newCStringLen enc f >>= unsafePackMallocCStringLen
 #endif
 
 -- | Convert from RawFilePath to FilePath
@@ -193,16 +190,12 @@
 #ifdef mingw32_HOST_OS
 decodeFilePath = UTF8.toString
 #else
-decodeFilePath = decodeFilePath' . map (toEnum . fromIntegral) . B.unpack
-
-{-# NOINLINE decodeFilePath' #-}
-decodeFilePath' :: String -> FilePath
-decodeFilePath' s = unsafePerformIO $ do
+{-# NOINLINE decodeFilePath #-}
+decodeFilePath f = unsafePerformIO $ do
        enc <- Encoding.getFileSystemEncoding
-       GHC.withCString Encoding.char8 s (GHC.peekCString enc)
+       B.useAsCStringLen f (GHC.peekCStringLen enc)
 #endif
 
-
 ---------------------------------------------------------------------
 -- Platform Abstraction Methods (private)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepath-bytestring-1.4.2.1.7/benchmark/benchmark.hs 
new/filepath-bytestring-1.4.2.1.8/benchmark/benchmark.hs
--- old/filepath-bytestring-1.4.2.1.7/benchmark/benchmark.hs    1970-01-01 
01:00:00.000000000 +0100
+++ new/filepath-bytestring-1.4.2.1.8/benchmark/benchmark.hs    2001-09-09 
03:46:40.000000000 +0200
@@ -0,0 +1,21 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+import qualified System.FilePath as FilePath
+import qualified System.FilePath.ByteString as RawFilePath
+import Criterion.Main
+
+main :: IO ()
+main = defaultMain
+       [ bgroup "combine"
+               [ bench "FilePath" $ nf (FilePath.combine "foo") "bar"
+               , bench "RawFilePath" $ nf (RawFilePath.combine "foo") "bar"
+               ]
+       , bgroup "dropTrailingPathSeparator"
+               [ bench "FilePath" $ nf FilePath.dropTrailingPathSeparator 
"foo/"
+               , bench "RawFilePath" $ nf 
RawFilePath.dropTrailingPathSeparator "foo/"
+               ]
+       , bgroup "FilePath conversion"
+               [ bench "encode" $ nf RawFilePath.encodeFilePath "foobar.baz"
+               , bench "decode" $ nf RawFilePath.decodeFilePath "foobar.baz"
+               ]
+       ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/filepath-bytestring-1.4.2.1.7/filepath-bytestring.cabal 
new/filepath-bytestring-1.4.2.1.8/filepath-bytestring.cabal
--- old/filepath-bytestring-1.4.2.1.7/filepath-bytestring.cabal 2001-09-09 
03:46:40.000000000 +0200
+++ new/filepath-bytestring-1.4.2.1.8/filepath-bytestring.cabal 2001-09-09 
03:46:40.000000000 +0200
@@ -1,13 +1,13 @@
 cabal-version: 1.18
 name:           filepath-bytestring
-version:        1.4.2.1.7
+version:        1.4.2.1.8
 -- NOTE: Don't forget to update CHANGELOG and the filepath dependency below
 license:        BSD3
 license-file:   LICENSE
 author:         Neil Mitchell <[email protected]>
 maintainer:     Joey Hess <[email protected]>
 copyright:      Neil Mitchell 2005-2019
-                Joey Hess 2019
+                Joey Hess 2019-2021
 category:       System
 build-type:     Simple
 synopsis:       Library for manipulating RawFilePaths in a cross platform way.
@@ -76,3 +76,16 @@
        -- Versions of filepath that are equvilant to this
        -- library, for quickcheck equivilance tests.
         filepath >= 1.4.2 && <= 1.4.2.1
+
+benchmark filepath-bench
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    main-is: benchmark.hs
+    ghc-options: -O2 -Wall -fno-warn-tabs
+    hs-source-dirs: benchmark
+    build-depends: 
+        base,
+        criterion,
+        filepath-bytestring,
+       -- Version of filepath to benchmark against
+        filepath >= 1.4.2 && <= 1.4.2.1

Reply via email to