Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Importing ibc-testkit failed #987

Closed
Tracked by #882
yito88 opened this issue Nov 24, 2023 · 2 comments · Fixed by #988
Closed
Tracked by #882

Importing ibc-testkit failed #987

yito88 opened this issue Nov 24, 2023 · 2 comments · Fixed by #988

Comments

@yito88
Copy link
Contributor

yito88 commented Nov 24, 2023

Bug Summary

I tried importing ibc-testkit and failed due to error: failed to select a version for ibc-app-transfer.

ibc = {version = "0.48.0", default-features = false, features = ["serde"]}
ibc-derive = "0.4.0"
ibc-proto = {version = "0.38.0", default-features = false}
ibc-testkit = {version = "0.48.0", default-features = false, optional = true}

Details

error: failed to select a version for `ibc-app-transfer`.
    ... required by package `ibc-apps v0.48.0`
    ... which satisfies dependency `ibc-apps = "^0.48.0"` of package `ibc v0.48.0`
    ... which satisfies dependency `ibc = "^0.48.0"` of package `ibc-testkit v0.48.0`
    ... which satisfies dependency `ibc-testkit = "^0.48.0"` of package `namada_core v0.27.0 (/Users/yuji/Workspace/anoma/namada/core)`
    ... which satisfies path dependency `namada_core` of package `namada v0.27.0 (/Users/yuji/Workspace/anoma/namada/shared)`
    ... which satisfies path dependency `namada` of package `namada_apps v0.27.0 (/Users/yuji/Workspace/anoma/namada/apps)`
    ... which satisfies path dependency `namada_apps` of package `namada_benchmarks v0.27.0 (/Users/yuji/Workspace/anoma/namada/benches)`
versions that meet the requirements `^0.48.0` are: 0.48.0

the package `ibc-apps` depends on `ibc-app-transfer`, with features: `serde_json` but `ibc-app-transfer` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `ibc-app-transfer` which could resolve this conflict
make: *** [build] Error 101

I tried the following change, it worked.

diff --git a/ibc-apps/ics20-transfer/Cargo.toml b/ibc-apps/ics20-transfer/Cargo.toml
index 2e992e71..4d54f2bf 100644
--- a/ibc-apps/ics20-transfer/Cargo.toml
+++ b/ibc-apps/ics20-transfer/Cargo.toml
@@ -38,7 +38,7 @@ std = [
 serde = [
     "ibc-app-transfer-types/serde",
     "ibc-core/serde",
-    "dep:serde_json"
+    "serde_json"
 ]
 schema = [
     "ibc-app-transfer-types/schema",

Version

v0.48.0

@mina86
Copy link
Contributor

mina86 commented Nov 25, 2023

I believe

diff --git a/ibc-apps/ics20-transfer/Cargo.toml b/ibc-apps/ics20-transfer/Cargo.toml
index 2e992e71..eb6de92e 100644
--- a/ibc-apps/ics20-transfer/Cargo.toml
+++ b/ibc-apps/ics20-transfer/Cargo.toml
@@ -33,7 +33,7 @@ default = ["std"]
 std = [
     "ibc-app-transfer-types/std",
     "ibc-core/std",
-    "serde_json/std",
+    "serde_json?/std",
 ]
 serde = [
     "ibc-app-transfer-types/serde",

is the correct fix. Could check if that fixes it for you?

@Farhad-Shabani
Copy link
Member

I couldn't reproduce this locally, and our CI and tests aren't catching it either. Apparently, this happens with Rust =1.70.0: rust-lang/cargo#12130. And, not sure until which version this issue persists. v1.73.0 seems to work fine. Anyway, sorry @yito88, @mina86 you ran into this. We'll release a patch soon, so you won't have to update your MRSV.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants