Skip to content

Commit

Permalink
Fix depcheck by updating dependency to cargo 0.81.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 26, 2024
1 parent fab7e23 commit 8f6df98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dev/depcheck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 3 additions & 5 deletions dev/depcheck/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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();
Expand Down

0 comments on commit 8f6df98

Please sign in to comment.