Trait SparseOutputFileFilter

Source
pub trait SparseOutputFileFilter<D>: FileFilter {
    // Required method
    fn sparse_sources(&self, file: &Path, graph: &GraphEdges<D>) -> Vec<PathBuf>;
}
Expand description

This trait behaves in a similar way to FileFilter but used to configure OutputSelection configuration. In certain cases, we might want to include some of the file dependencies into the compiler output even if we might not be directly interested in them.

Example of such case is when we are compiling Solidity file containing link references and need them to be included in the output to deploy needed libraries.

Required Methods§

Source

fn sparse_sources(&self, file: &Path, graph: &GraphEdges<D>) -> Vec<PathBuf>

Receives path to the file and resolved project sources graph.

Returns a list of paths to the files that should be compiled with full output selection.

Might return an empty list if no files should be compiled.

Implementors§