Skip to content

Commit

Permalink
chore: fix no_std builds
Browse files Browse the repository at this point in the history
I’m not entirely sure if it’s no_std specifically that causes the
issue, but if ibc-apps-transfer is build without std feature but with
serde feature it enables serde_json/std feature while serde_json
dependency isn’t enabled.  This seems to confuse Cargo which thinks
serde_json is supposed to be a feature.  This all leads to a failure
in dependency resolution:

    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"` (locked to 0.48.0) of package `ibc v0.48.0`
        ... which satisfies dependency `ibc = "^0.48.0"` (locked to 0.48.0) of package `ibc-testkit v0.48.0`
        ... which satisfies dependency `ibc-testkit = "^0.48.0"` (locked to 0.48.0) of package …
    versions that meet the requirements `^0.48.0` (locked to 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.
  • Loading branch information
mina86 committed Nov 25, 2023
1 parent 8c1766f commit 577b26e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/987-serde-json-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix dependency resolution whan building no_std
([#987](https://github.com/cosmos/ibc-rs/issues/987))
2 changes: 1 addition & 1 deletion ibc-apps/ics20-transfer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 577b26e

Please sign in to comment.