From 7109e74a7fc14f8f9c96a44e4dbced7855ca5eff Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Tue, 7 Jan 2025 21:08:46 +0000 Subject: [PATCH] rust: crate_tool: Sort patches directory before using Patches sometimes intentionally have `0001`, `0002`, etc. or other alphabetization methods to indicate what order patches should be applied in. Previously, we gathered up patches in directory-walk order, which sometimes resulted in patches not applying. Bug: 388276112 Test: ./crate_tool regenerate rustc-demangle-capi Change-Id: Ic66b10024908a86dcf3ec13d0fb901333696966f --- tools/external_crates/crate_tool/src/managed_crate.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/external_crates/crate_tool/src/managed_crate.rs b/tools/external_crates/crate_tool/src/managed_crate.rs index 73fea883da1..1ec3897256e 100644 --- a/tools/external_crates/crate_tool/src/managed_crate.rs +++ b/tools/external_crates/crate_tool/src/managed_crate.rs @@ -131,6 +131,7 @@ impl ManagedCrate { patches.push(entry.path()); } } + patches.sort(); Ok(patches) }