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

examples don't build with default features #187

Closed
0xalpharush opened this issue Aug 15, 2024 · 0 comments · Fixed by #188
Closed

examples don't build with default features #187

0xalpharush opened this issue Aug 15, 2024 · 0 comments · Fixed by #188
Assignees

Comments

@0xalpharush
Copy link

The example in the README and in the rust doc comments don't build with the default features of the library. It is necessary to add
features like foundry-compilers = {git = "https://github.com/foundry-rs/compilers/" , ref ="850de5063f280046dd0e06ea9176700f08650fb5", features = ["project-util", "svm-solc"]}

Tests with similar code are guarded by these, for example.

#[cfg(all(feature = "project-util", feature = "svm-solc"))]
mod tests {
use std::path::Path;

The build error:

error[E0277]: the trait bound `MultiCompiler: std::default::Default` is not satisfied
 --> src/main.rs:7:12
  |
7 |     .build(Default::default())
  |            ^^^^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `MultiCompiler`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants