Hello community,

here is the log from the commit of package ghc-protobuf-simple for 
openSUSE:Factory checked in at 2017-04-29 10:53:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-protobuf-simple (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-protobuf-simple.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-protobuf-simple"

Sat Apr 29 10:53:18 2017 rev:4 rq:491692 version:0.1.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-protobuf-simple/ghc-protobuf-simple.changes  
2017-04-20 20:55:59.217228624 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-protobuf-simple.new/ghc-protobuf-simple.changes 
    2017-04-29 10:53:20.545769496 +0200
@@ -1,0 +2,5 @@
+Wed Apr 19 13:32:41 UTC 2017 - [email protected]
+
+- Update to version 0.1.0.4 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  protobuf-simple-0.1.0.3.tar.gz

New:
----
  protobuf-simple-0.1.0.4.tar.gz

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

Other differences:
------------------
++++++ ghc-protobuf-simple.spec ++++++
--- /var/tmp/diff_new_pack.0md9Vd/_old  2017-04-29 10:53:21.217674577 +0200
+++ /var/tmp/diff_new_pack.0md9Vd/_new  2017-04-29 10:53:21.221674012 +0200
@@ -19,7 +19,7 @@
 %global pkg_name protobuf-simple
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.0.3
+Version:        0.1.0.4
 Release:        0
 Summary:        Simple Protocol Buffers library (proto2)
 License:        MIT

++++++ protobuf-simple-0.1.0.3.tar.gz -> protobuf-simple-0.1.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protobuf-simple-0.1.0.3/protobuf-simple.cabal 
new/protobuf-simple-0.1.0.4/protobuf-simple.cabal
--- old/protobuf-simple-0.1.0.3/protobuf-simple.cabal   2017-03-30 
15:17:31.000000000 +0200
+++ new/protobuf-simple-0.1.0.4/protobuf-simple.cabal   2017-04-12 
13:48:08.000000000 +0200
@@ -3,7 +3,7 @@
 
 name:                protobuf-simple
 synopsis:            Simple Protocol Buffers library (proto2)
-version:             0.1.0.3
+version:             0.1.0.4
 homepage:            https://github.com/sru-systems/protobuf-simple
 license:             MIT
 license-file:        LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protobuf-simple-0.1.0.3/src/Data/ProtoBufInt.hs 
new/protobuf-simple-0.1.0.4/src/Data/ProtoBufInt.hs
--- old/protobuf-simple-0.1.0.3/src/Data/ProtoBufInt.hs 2017-03-30 
14:28:59.000000000 +0200
+++ new/protobuf-simple-0.1.0.4/src/Data/ProtoBufInt.hs 2017-04-12 
13:47:24.000000000 +0200
@@ -41,7 +41,7 @@
 import Data.Set              as Export (fromList)
 import Data.Text.Lazy        as Export (Text, pack)
 import Data.Word             as Export (Word32, Word64)
-import Prelude               as Export (Double, Eq, Float, Ord, Show)
+import Prelude               as Export (Double, Eq, Float, Ord, Show, return)
 
 
 -- | Append a value to a Seq.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/protobuf-simple-0.1.0.3/src/Parser/MessageGenerator.hs 
new/protobuf-simple-0.1.0.4/src/Parser/MessageGenerator.hs
--- old/protobuf-simple-0.1.0.3/src/Parser/MessageGenerator.hs  2017-03-30 
14:28:59.000000000 +0200
+++ new/protobuf-simple-0.1.0.4/src/Parser/MessageGenerator.hs  2017-04-12 
13:47:24.000000000 +0200
@@ -69,7 +69,9 @@
 
 getImports :: FileDesc -> MessageDesc -> State GenState Builder
 getImports f md = return $
-    getUnqualifiedImport "Control.Applicative" "(<$>)" <>
+    (if MessageDesc.getFields md == []
+       then fromString ""
+       else getUnqualifiedImport "Control.Applicative" "(<$>)") <>
     getUnqualifiedImport "Prelude" "" <>
     getQualifiedAsImport "Data.ProtoBufInt" "PB" <>
     getExtraImports f md
@@ -276,7 +278,9 @@
     mergeableLines <- getMergeableLines fields
     return $
       fromString "instance PB.Mergeable " <> fromString name <> fromString " 
where" <> nl <>
-      tab <> fromString "merge a b = " <> fromString name <> nl <>
+      tab <> (if mergeableLines == fromString ""
+                then fromString "merge _ _ = "
+                else fromString "merge a b = ") <> fromString name <> nl <>
       tab <> tab <> fromString "{ " <>
       mergeableLines <> nl <>
       tab <> tab <> fromString "}" <> nl
@@ -368,8 +372,10 @@
     return $
       fromString "instance PB.WireMessage " <> fromString name <> fromString " 
where" <> nl <>
       flines <> nl <>
-      tab <> fromString "messageToFields self = do" <> nl <>
-      mlines <> nl
+      tab <> if mlines == fromString ""
+               then fromString "messageToFields _ = PB.return ()" <> nl
+               else fromString "messageToFields self = do" <> nl <>
+                    mlines <> nl
   where
     name = MessageDesc.getName md
     fields = MessageDesc.getFields md


Reply via email to