cosmos / ibc-rs

Rust implementation of the Inter-Blockchain Communication (IBC) protocol.
Apache License 2.0
182 stars 74 forks source link

Update the feature list of `parity-scale-codec` dependency #1124

Closed rnbguy closed 1 month ago

rnbguy commented 3 months ago

https://github.com/cosmos/ibc-rs/blob/5e7ff8e42c15592cff22a14536cc479f08cf8024/Cargo.toml#L107

"full" feature is deprecated and doesn't enable anything. Rather this should be "derive".


Although, there is an interesting scenario with scale-info dependency.

#[derive(parity_scale_codec::Encode, parity_scale_codec::Decode)]
pub struct Signer(String);

the above doesn't compile with

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false }

or

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["full"] }

but with the following it compiles

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false }
scale-info         = { version = "2.10.0", default-features = false }

of course it also compiles with

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["derive"] }
seanchen1991 commented 1 month ago

You mention two possible options that successfully compile. Should we go with the first or the second?

seanchen1991 commented 1 month ago

Actually, I see that you touched this code 3 weeks ago (though the parity-scale-codec dependency still has features = [ "full" ] enabled). Is this issue still relevant?

rnbguy commented 1 month ago

It is still relevant :slightly_smiling_face: I modified those lines in chore(deps) PR. but I forgot to take care of this issue :sweat_smile:

rnbguy commented 1 month ago

You mention two possible options that successfully compile. Should we go with the first or the second?

It should be something like this,

parity-scale-codec = { version = "3.6.5", default-features = false, features = [ "derive" ] }
scale-info         = { version = "2.10.0", default-features = false }