Skip to content

Commit 93b3c3f

Browse files
committed
Continue compiling if preprocessor fails parsing
1 parent 14cabe3 commit 93b3c3f

File tree

1 file changed

+3
-4
lines changed
  • crates/compilers/src/preprocessor

1 file changed

+3
-4
lines changed

crates/compilers/src/preprocessor/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
Compiler, ProjectPathsConfig, Result,
1212
};
1313
use foundry_compilers_artifacts::SolcLanguage;
14-
use foundry_compilers_core::{error::SolcError, utils};
14+
use foundry_compilers_core::utils;
1515
use solar_parse::{
1616
ast::{FunctionKind, ItemKind, Span, Visibility},
1717
interface::{diagnostics::EmittedDiagnostics, source_map::FileName, Session, SourceMap},
@@ -97,10 +97,9 @@ impl Preprocessor<SolcCompiler> for TestOptimizerPreprocessor {
9797
Ok(())
9898
});
9999

100-
// Return if any diagnostics emitted during content parsing.
100+
// Warn if any diagnostics emitted during content parsing.
101101
if let Err(err) = sess.emitted_errors().unwrap() {
102-
trace!("failed preprocessing {err}");
103-
return Err(SolcError::Message(err.to_string()));
102+
warn!("failed preprocessing {err}");
104103
}
105104

106105
Ok(())

0 commit comments

Comments
 (0)