Closed luca992 closed 1 year ago
We re-export secret-cosmwasm-std
from Fadroma and have designed it such that it is to be used with the version that we have. Our latest version 0.8.7
is using secret-cosmwasm-std
v1.1.10
which is the latest from crates.io.
As for the compile error, it's expecting a field that is behind a feature flag in CW that we haven't enabled in our re-export: https://github.com/scrtlabs/cosmwasm/blob/v1.1.10-secret/packages/std/src/types.rs#L88-L90
We could publish a new version that allows you to enable it if you need it though.
If you have a workspace project, you can try slapping a
[workspace]
resolver = "2"
in your root workspace Cargo.toml
. But I suspect that since you are using a different version of secret-cosmwasm-std
you will be getting compile errors regardless.
Depending on your project structure, I suggest one of:
secret-cosmwasm-std = { version = "1.1.10", default-features = false }
if you are only using Fadroma with the Ensemble in a separate crate. You shouldn't be getting any breaking changes.Yeah as I said I was using 1.1.10
. And using resolver ="2"
doesn't help unfortunately.
Here's an example project/branch where running cargo test
fails after adding fadroma:
https://github.com/eqoty-labs/cw-migratable-contract-std/tree/fadroma-example
I am also having issues with the iterator feature
I managed to fix the iterator issue with:
# Enable iterator for testing (not supported in production)
[target.'cfg(not(target_arch="wasm32"))'.dependencies]
cosmwasm-storage = { package = "secret-cosmwasm-storage", version = "1.1.10", default-features = false, features = ["iterator"] }
is that expected to be needed to add?
As for the compile error, it's expecting a field that is behind a feature flag in CW that we haven't enabled in our re-export: https://github.com/scrtlabs/cosmwasm/blob/v1.1.10-secret/packages/std/src/types.rs#L88-L90
We could publish a new version that allows you to enable it if you need it though.
I think I do need that since I'm using the latest secret-toolkit where random
is enabled?
The iterator
feature is not supported on SN so we have disabled it. I noticed that you are using both fadroma and secret-toolkit. I myself had trouble compiling when using both in the same workspace. Your fix for that seems to be the way to go though.
I see that the random
flag does not enable any dependencies, so I don't see a reason why it should be a feature to begin with. I can make another release where we have it enabled. You can try that and let me know.
Can you try the latest master branch?
fadroma = { git = "https://github.com/hackbg/fadroma", rev = "119ae46", features = ["scrt", "ensemble"] }
It's working for me in your project. It includes the fix for #179 as well.
Let me know if it's all good then and I will go ahead and publish a new version on crates.io
@aakamenov working for me 👍 thanks
Cool! I've published that now: https://crates.io/crates/fadroma/0.8.8
I'm trying to add ensemble to my project, but after adding ensemble like:
fadroma = { version = "0.8.7", features = ["ensemble", "scrt"] }
and running test I get this error.
My project is using
secret-cosmwasm-std
v1.0.10