I ran into a problem where add_serde() will append trait impls to google.protobuf.rs after each build, but neither prost nor prost-wkt would clear it, so it only becomes bigger and bigger.
And I found the generated google.protobuf.rs isn't actually used, so the duplicated code won't break the build. But if anyone includes the generated files in VCS, there will be a problem. A simple workaround I currently use is to remove google.protobuf.rs after add_serde():
I ran into a problem where
add_serde()
will append trait impls togoogle.protobuf.rs
after each build, but neither prost nor prost-wkt would clear it, so it only becomes bigger and bigger.https://github.com/fdeantoni/prost-wkt/blob/bedabbb2077da8d342269d6d641b783a8440946b/wkt-build/src/lib.rs#L12-L41
And I found the generated
google.protobuf.rs
isn't actually used, so the duplicated code won't break the build. But if anyone includes the generated files in VCS, there will be a problem. A simple workaround I currently use is to removegoogle.protobuf.rs
afteradd_serde()
: