Can't get the dependency list of packages
I'm not sure, if it's my fault or if it's an issue, but i can't get the dependency-list of the found packages.
I'm using tokio as the async-environment and the Handler::search(s: String) function.
Here the important parts of my source-code.
main.rs:
mod cli;
#[tokio::main]
async fn main() {
//...
let search_name = "some_string";
cli::search_cli(search_name.to_owned()).await;
//...
}
and here in cli.rs:
pub async fn search_cli(search_name: String) {
let raur_handler = raur::Handle::new();
match raur_handler.search(search_name.clone()).await {
Ok(pkg_vec) => {
for pkg in pkg_vec.clone() {
println!("----------------------------------");
println!(
"Name: {}; Version: {}; Updated: {}",
pkg.name, pkg.version, pkg.last_modified
);
println!(
"Description: {}",
pkg.description
.unwrap_or("no description available".to_string())
);
println!(
"Dependencies: \n runtime: {}, make: {}, check: {}, optional: {}",
pkg.depends.len(),
pkg.make_depends.len(),
pkg.check_depends.len(),
pkg.opt_depends.len()
);
println!(
"Upstream: {}",
pkg.url.unwrap_or("not available".to_string())
);
println!("Git Url: https://aur.archlinux.org/{}", pkg.package_base);
println!("==================================");
}
println!("Found {} packages.", pkg_vec.len());
}
Err(err) => {
println!("Error while searching for {}: \n {}", search_name, err);
}
}
}
Here the sample output of search_cli with librewolf-bin as search_name:
Name: librewolf-bin; Version: 116.0.2-1; Updated: 1691670380
Description: Community-maintained fork of Firefox, focused on privacy, security and freedom.
Dependencies:
runtime: 0, make: 0, check: 0, optional: 0
Upstream: https://librewolf-community.gitlab.io/
Git Url: https://aur.archlinux.org/librewolf-bin
And if it's helpfull, here the full source-code.
I'm not sure, what the problem is. Would be nice, if someone could check, if they get the dependency list, to verify, that this is a bug and not just a local bug for me.
Edited by Nikl