From 8f6df98e8d31b269c7148f476194fd5dcd6a55c5 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 26 Jul 2024 10:20:25 -0400 Subject: [PATCH] Fix depcheck by updating dependency to cargo 0.81.0 --- dev/depcheck/Cargo.toml | 2 +- dev/depcheck/src/main.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dev/depcheck/Cargo.toml b/dev/depcheck/Cargo.toml index cb4e77eabb22..23cefaec43be 100644 --- a/dev/depcheck/Cargo.toml +++ b/dev/depcheck/Cargo.toml @@ -22,4 +22,4 @@ name = "depcheck" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cargo = "0.78.1" +cargo = "0.81.0" diff --git a/dev/depcheck/src/main.rs b/dev/depcheck/src/main.rs index 1599fdd4188d..a30539c4b01b 100644 --- a/dev/depcheck/src/main.rs +++ b/dev/depcheck/src/main.rs @@ -17,21 +17,19 @@ extern crate cargo; -use cargo::CargoResult; +use cargo::{CargoResult, GlobalContext}; /// Check for circular dependencies between DataFusion crates use std::collections::{HashMap, HashSet}; use std::env; use std::path::Path; -use cargo::util::config::Config; - /// Verifies that there are no circular dependencies between DataFusion crates /// (which prevents publishing on crates.io) by parsing the Cargo.toml files and /// checking the dependency graph. /// /// See https://github.com/apache/datafusion/issues/9278 for more details fn main() -> CargoResult<()> { - let config = Config::default()?; + let global_context = GlobalContext::default()?; // This is the path for the depcheck binary let path = env::var("CARGO_MANIFEST_DIR").unwrap(); let root_cargo_toml = Path::new(&path) @@ -47,7 +45,7 @@ fn main() -> CargoResult<()> { "Checking for circular dependencies in {}", root_cargo_toml.display() ); - let workspace = cargo::core::Workspace::new(&root_cargo_toml, &config)?; + let workspace = cargo::core::Workspace::new(&root_cargo_toml, &global_context)?; let (_, resolve) = cargo::ops::resolve_ws(&workspace)?; let mut package_deps = HashMap::new();