Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

E2E: Include e2e deps only for cargo test #1428

Closed
cmichi opened this issue Sep 29, 2022 · 0 comments · Fixed by #1429
Closed

E2E: Include e2e deps only for cargo test #1428

cmichi opened this issue Sep 29, 2022 · 0 comments · Fixed by #1429
Labels
A-ink_env [ink_env] work item

Comments

@cmichi
Copy link
Collaborator

cmichi commented Sep 29, 2022

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.

@cmichi cmichi added the A-ink_env [ink_env] work item label Sep 29, 2022
@cmichi cmichi moved this to Backlog 🗒 in Smart Contracts Sep 29, 2022
Repository owner moved this from Backlog 🗒 to Done ✅ in Smart Contracts Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_env [ink_env] work item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant