-
Notifications
You must be signed in to change notification settings - Fork 480
Description
Follow-up to #1424.
At the moment we have a ton of heavy-weight std dependencies needed for #[ink::e2e_test] in crates/env/Cargo.toml (there's a comment indicating which ones). Those deps are only needed when executing cargo test. Unfortunately there is no way in cargo to conditionally include dependencies for cfg(test).
The problem:
cargo-contractfor metadata generation builds the contract instdas well (here is the manifest file for the metadata generation).- if developers just casually execute
cargo buildorcargo checkall E2E reps will be built too.
We need to find a way to include those E2E deps only for cargo test, but not for the metadata generation of cargo-contract. Right now the build time of cargo contract build (and also just cargo build) has exploded, because all those unnecessary E2E deps are build as well.
I would really like to avoid a hack like cargo test --features e2e. This would be quite bad in terms of UX.
dev-dependencies can't be used because they are not propagated to other packages and we have an ink entrance crate now, which depends on ink_env.