diff --git a/crates/compilers/src/zksync/compile/project.rs b/crates/compilers/src/zksync/compile/project.rs index d44f2fb4..6d0e97ea 100644 --- a/crates/compilers/src/zksync/compile/project.rs +++ b/crates/compilers/src/zksync/compile/project.rs @@ -46,8 +46,11 @@ impl<'a> ProjectCompiler<'a> { /// multiple `jobs`, see [`crate::Project::set_solc_jobs()`]. pub fn with_sources( project: &'a Project, - sources: Sources, + mut sources: Sources, ) -> Result { + if let Some(filter) = &project.sparse_output { + sources.retain(|f, _| filter.is_match(f)) + } let graph = Graph::resolve_sources(&project.paths, sources)?; let (sources, edges) = graph.into_sources_by_version( project.offline,