cbindgen shouldn't emit errors for declarations that won't be printed anyway
At https://github.com/signalapp/libsignal-client/commit/7be34d74461578b326b68007be7ee0c9374c0c7e, running cbindgen in rust/bridge/ffi produces the following errors:
ERROR: Conflicting name for constant signal-crypto::Aes256GcmEncryption::NONCE_SIZE.
ERROR: Conflicting name for constant signal-crypto::Aes256GcmDecryption::TAG_SIZE.
ERROR: Conflicting name for constant signal-crypto::Aes256GcmDecryption::NONCE_SIZE.
However, the cbindgen.toml in that directory has constants disabled:
[export]
item_types = ["enums", "functions", "opaque", "structs", "typedefs"]
So there's no problem with conflicting names, and indeed the resulting header is correct.
Yeah, we filter out stuff later after parsing, so we still get the parsing warnings. My guess is that this shouldn't be hard to fix.
@jrose-signal were you able to resolve this issue with signal? (I'm trying to generate signal_ffi)
No, we just ignore the errors, assuming that we'll see any problems when we actually try to use the header from Swift. :-(