Skip to content

E2E: Include e2e deps only for cargo test #1428

@cmichi

Description

@cmichi

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ink_env[ink_env] work item

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions