Hey there!
In the ic-stable-memory
library, I’ve implemented a bunch of traits for IC-specific types, such as Principal
, Nat
and Int
. I’m importing them from candid 0.8.4
library.
Some users of ic-stable-memory
have been reporting an error that if they use a different version of candid
in their projects alongside ic-stable-memory
, Rust won’t compile their code with an error stating that traits from ic-stable-memory
are not implemented for, for example, Principal
type they import from candid
library. It seems like Rust sees these two types as completely different entities.
It seems that ic-cdk
also has such an issue, where you have to use the same version of candid
in order for it to work. Even if the types are not changed, if something new gets implemented in the candid
library, everybody else have to bump their versions in order for everything to continue to work.
So, with that being said, I’d like to propose a simple solution for the team responsible for candid
library.
Could you please move all shared types (mainly, these three) into a separate crate (candid-types
or smth) that everybody can reference and that won’t be updated as frequently as candid
?