From eae4b812f811745bb2b6433ec3ce63a7051af1e0 Mon Sep 17 00:00:00 2001 From: Marek Kaput Date: Wed, 11 Dec 2024 07:19:53 +0100 Subject: [PATCH] fixup! Use patch-based Cairo dependencies specification --- xtask/src/set_cairo_version.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xtask/src/set_cairo_version.rs b/xtask/src/set_cairo_version.rs index b400aaa..9b85dc7 100644 --- a/xtask/src/set_cairo_version.rs +++ b/xtask/src/set_cairo_version.rs @@ -210,6 +210,11 @@ fn simplify_dependency_table(dep: &mut Value) { } } +/// Remove any unused patches from the `[patch.crates-io]` table. +/// +/// We are adding patch entries for **all** Cairo crates existing, and some may end up being unused. +/// Cargo is emitting warnings about unused patches and keeps a record of them in the `Cargo.lock`. +/// The goal of this function is to resolve these warnings. fn purge_unused_patches(cargo_toml: &mut DocumentMut) -> Result<()> { let sh = Shell::new()?; let cargo_lock = sh.read_file("Cargo.lock")?.parse::()?;