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

fix(cli): don't check sources directory existance during compilation #2121

Merged
merged 1 commit into from
Jun 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 0 additions & 21 deletions cli/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,6 @@ impl ProjectCompiler {
F: FnOnce(&Project) -> eyre::Result<ProjectCompileOutput>,
{
let ProjectCompiler { print_sizes, print_names } = self;
if !project.paths.sources.exists() {
eyre::bail!(
r#"no contracts to compile, contracts folder "{}" does not exist.
Check the configured workspace settings:
{}
If you are in a subdirectory in a Git repository, try adding `--root .`"#,
project.paths.sources.display(),
project.paths
);
}

let now = std::time::Instant::now();
tracing::trace!(target : "forge::compile", "start compiling project");
Expand Down Expand Up @@ -219,17 +209,6 @@ If you are in a subdirectory in a Git repository, try adding `--root .`"#,
/// compilation was successful or if there was a cache hit.
/// Doesn't print anything to stdout, thus is "suppressed".
pub fn suppress_compile(project: &Project) -> eyre::Result<ProjectCompileOutput> {
if !project.paths.sources.exists() {
eyre::bail!(
r#"no contracts to compile, contracts folder "{}" does not exist.
Check the configured workspace settings:
{}
If you are in a subdirectory in a Git repository, try adding `--root .`"#,
project.paths.sources.display(),
project.paths
);
}

let output = ethers::solc::report::with_scoped(
&ethers::solc::report::Report::new(NoReporter::default()),
|| project.compile(),
Expand Down