Skip to content

examples don't build with default features #187

@0xalpharush

Description

@0xalpharush

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`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions