fn get_plugin_name_recursive(
    aliases: &IndexMap<String, String>,
    name: &str,
    seen: &mut Vec<String>,
) -> String {
    let name_string = name.to_string();
    if seen.contains(&name_string) {
        error!("Detected cycle while resolving plugin alias: {}", name);
    }
    seen.push(name_string);

    match aliases.get(name) {
        Some(target_name) => get_plugin_name_recursive(aliases, target_name, seen),
        None => name.to_string(),
    }
}
Resolve aliases to different plugins, checking for cycles
src/lib/plugin/runner.rs