fn collect_all_sources(
    target_sources: &[String],
    input_deps: &[String],
) -> anyhow::Result<Vec<String>> {
    let mut all_sources = target_sources.to_vec();
    static DEP_REGEX: Lazy<Regex> =
        Lazy::new(|| Regex::new(r"(?m)use\s*0x[0-9abcdefABCDEF]+::\s*(\w+)").unwrap());
    static FRIEND_REGEX: Lazy<Regex> = Lazy::new(|| {
        Regex::new(r"(?m)pragma\s*friend\s*=\s*0x[0-9abcdefABCDEF]+::\s*(\w+)").unwrap()
    });

    let target_deps = calculate_deps(&all_sources, input_deps, &DEP_REGEX)?;
    all_sources.extend(target_deps);

    let friend_sources = calculate_deps(&all_sources, input_deps, &FRIEND_REGEX)?;
    all_sources.extend(friend_sources);

    let friend_deps = calculate_deps(&all_sources, input_deps, &DEP_REGEX)?;
    all_sources.extend(friend_deps);

    Ok(all_sources)
}
/// Collect all the relevant Move sources among sources represented by `input deps`
/// parameter. The resulting vector of sources includes target sources, dependencies
/// of target sources, (recursive)friends of targets and dependencies, and
/// dependencies of friends.
Collect all the relevant Move sources among sources represented by `input deps`
parameter. The resulting vector of sources includes target sources, dependencies
of target sources, (recursive)friends of targets and dependencies, and
dependencies of friends.
Collect all the relevant Move sources among sources represented by ` input deps ` parameter . The resulting vector of sources includes target sources dependencies of target sources ( recursive ) friends of targets and dependencies and dependencies of friends .
fn collect_all_sources(
    target_sources: &[String],
    input_deps: &[String],
) -> anyhow::Result<Vec<String>> {
    let mut all_sources = target_sources.to_vec();
    static DEP_REGEX: Lazy<Regex> =
        Lazy::new(|| Regex::new(r"(?m)use\s*0x[0-9abcdefABCDEF]+::\s*(\w+)").unwrap());
    static FRIEND_REGEX: Lazy<Regex> = Lazy::new(|| {
        Regex::new(r"(?m)pragma\s*friend\s*=\s*0x[0-9abcdefABCDEF]+::\s*(\w+)").unwrap()
    });
    let target_deps = calculate_deps(&all_sources, input_deps, &DEP_REGEX)?;
    all_sources.extend(target_deps);
    let friend_sources = calculate_deps(&all_sources, input_deps, &FRIEND_REGEX)?;
    all_sources.extend(friend_sources);
    let friend_deps = calculate_deps(&all_sources, input_deps, &DEP_REGEX)?;
    all_sources.extend(friend_deps);
    Ok(all_sources)
}
fn collect_all_sources ( target_sources : & [ String ] , input_deps : & [ String ] , ) -> anyhow :: Result < Vec < String > > { let mut all_sources = target_sources . to_vec ( ) ; static DEP_REGEX : Lazy < Regex > = Lazy :: new ( | | Regex :: new ( r"(?m)use\s*0x[0-9abcdefABCDEF]+::\s*(\w+)" ) . unwrap ( ) ) ; static FRIEND_REGEX : Lazy < Regex > = Lazy :: new ( | | { Regex :: new ( r"(?m)pragma\s*friend\s*=\s*0x[0-9abcdefABCDEF]+::\s*(\w+)" ) . unwrap ( ) } ) ; let target_deps = calculate_deps ( & all_sources , input_deps , & DEP_REGEX ) ? ; all_sources . extend ( target_deps ) ; let friend_sources = calculate_deps ( & all_sources , input_deps , & FRIEND_REGEX ) ? ; all_sources . extend ( friend_sources ) ; let friend_deps = calculate_deps ( & all_sources , input_deps , & DEP_REGEX ) ? ; all_sources . extend ( friend_deps ) ; Ok ( all_sources ) }
Collect all the relevant Move sources among sources represented by `input deps`
parameter.
Collect all the relevant Move sources among sources represented by ` input deps ` parameter .
target_sources
&[String]
input_deps
&[String]