Skip to content

Commit

Permalink
Changes after review: reuse MultiCompilerLanguage::FILE_EXTENSIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Jun 13, 2024
1 parent 6da9a55 commit 0e71ca5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crates/forge/bin/cmd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ use clap::Parser;
use eyre::Result;
use foundry_cli::{opts::CoreBuildArgs, utils::LoadConfig};
use foundry_common::compile::ProjectCompiler;
use foundry_compilers::{utils::source_files_iter, Project, ProjectCompileOutput};
use foundry_compilers::{
compilers::{multi::MultiCompilerLanguage, Language},
utils::source_files_iter,
Project, ProjectCompileOutput,
};
use foundry_config::{
figment::{
self,
Expand All @@ -18,9 +22,6 @@ use watchexec::config::{InitConfig, RuntimeConfig};

foundry_config::merge_impl_figment_convert!(BuildArgs, args);

// Extensions accepted by `forge build`
const BUILD_EXTENSIONS: &[&str] = &["sol", "yul", "vy", "vyi"];

/// CLI arguments for `forge build`.
///
/// CLI arguments take the highest precedence in the Config/Figment hierarchy.
Expand Down Expand Up @@ -87,7 +88,7 @@ impl BuildArgs {
let mut files = vec![];
if let Some(dirs) = self.args.paths {
for dir in dirs {
files.extend(source_files_iter(dir, BUILD_EXTENSIONS));
files.extend(source_files_iter(dir, MultiCompilerLanguage::FILE_EXTENSIONS));
}
}

Expand Down

0 comments on commit 0e71ca5

Please sign in to comment.