protocol-buffers icon indicating copy to clipboard operation
protocol-buffers copied to clipboard

Generated code compiles with warning

Open romand opened this issue 7 years ago • 0 comments

If you have an empty protobuf message, the generated code compiles with «Defined but not used» warning:

$ cat test.proto
package test;
message Test {}
$ hprotoc test.proto
…
$ tail -n4 Test/Test.hs
instance P'.TextMsg Test where
  textPut msg = Prelude'.return ()
  textGet = Prelude'.return P'.defaultValue
    where%
$ stack build
…
    Defined but not used: ‘msg’
   |
68 |   textPut msg = Prelude'.return ()
   |           ^^^

romand avatar Sep 26 '18 15:09 romand