From cc7ecf2f1cf7808e3c9a26bca8d3a78b71d26ef5 Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Thu, 1 Oct 2026 15:21:36 +0000 Subject: [PATCH 1/2] Let the OpenSSL check download the crates a build doesn't `cargo tree --target all` reads the manifest of every locked crate, and a build only downloads the host's. With `--offline` the test passed only where the registry already held the Windows and Android crates: CI's cache did until Rust 1.99.0 changed its key, and then both jobs failed on android_system_properties. `--locked` replaces `--offline`, so cargo downloads what is missing and resolves nothing new. Co-Authored-By: Claude Opus 5.5 --- tests/packaging.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/packaging.rs b/tests/packaging.rs index 5e0352172..85e2645ec 100644 --- a/tests/packaging.rs +++ b/tests/packaging.rs @@ -58,6 +58,11 @@ fn package_carries_the_factory_skills_with_their_license_and_credits() { } } +/// Not `--offline`: `--target all` reads the manifest of every locked crate, +/// and a build only downloads the host's, so a fresh registry (a new clone, or +/// CI after a Rust release drops its cache) lacks the Windows and Android +/// ones. cargo downloads those here; with them present it stays off the +/// network, and `--locked` keeps it from resolving anything new. #[test] fn the_binary_never_links_openssl() { let output = Command::new(env!("CARGO")) @@ -71,7 +76,7 @@ fn the_binary_never_links_openssl() { "{p}", "--target", "all", - "--offline", + "--locked", ]) .current_dir(env!("CARGO_MANIFEST_DIR")) .output() From 238f64bd3014e3be7b8611dc61773c57ffb493ed Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Thu, 1 Oct 2026 15:24:08 +0000 Subject: [PATCH 2/2] Address review: put the comment beside the flag it explains The missing crates are every other platform's, not only Windows and Android. Co-Authored-By: Claude Opus 5.5 --- tests/packaging.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/packaging.rs b/tests/packaging.rs index 85e2645ec..421097c72 100644 --- a/tests/packaging.rs +++ b/tests/packaging.rs @@ -58,11 +58,6 @@ fn package_carries_the_factory_skills_with_their_license_and_credits() { } } -/// Not `--offline`: `--target all` reads the manifest of every locked crate, -/// and a build only downloads the host's, so a fresh registry (a new clone, or -/// CI after a Rust release drops its cache) lacks the Windows and Android -/// ones. cargo downloads those here; with them present it stays off the -/// network, and `--locked` keeps it from resolving anything new. #[test] fn the_binary_never_links_openssl() { let output = Command::new(env!("CARGO")) @@ -76,6 +71,12 @@ fn the_binary_never_links_openssl() { "{p}", "--target", "all", + // Not `--offline`: `--target all` reads the manifest of every + // locked crate, and a build only downloads the host's, so a fresh + // registry (a new clone, or CI after a Rust release drops its + // cache) lacks the other platforms' crates. cargo downloads those + // here; with them present it stays off the network, and + // `--locked` keeps it from resolving anything new. "--locked", ]) .current_dir(env!("CARGO_MANIFEST_DIR"))