From 2eaf2a155d420d0db94d15d8324e4113aded4da1 Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 16 Jun 2025 18:17:28 +0200 Subject: [PATCH] Panic at the CI workflow Gotta test something here --- .github/workflows/ci.yml | 3 ++- crates/uv-build-backend/src/metadata.rs | 1 + crates/uv-git/src/credentials.rs | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09d27b6d2..51a9c4c88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,9 @@ env: CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 CARGO_TERM_COLOR: always - RUSTUP_MAX_RETRIES: 10 PYTHON_VERSION: "3.12" + RUSTUP_MAX_RETRIES: 10 + RUST_BACKTRACE: 1 jobs: determine_changes: diff --git a/crates/uv-build-backend/src/metadata.rs b/crates/uv-build-backend/src/metadata.rs index 00a207c7a..9c2acd519 100644 --- a/crates/uv-build-backend/src/metadata.rs +++ b/crates/uv-build-backend/src/metadata.rs @@ -221,6 +221,7 @@ impl PyProjectToml { r#"`build_system.requires = ["{uv_requirement}"]` does not contain the current uv version {uv_version}"#, )); + panic!("BOOM"); } Ranges::from(specifier.clone()) .bounding_range() diff --git a/crates/uv-git/src/credentials.rs b/crates/uv-git/src/credentials.rs index 051560980..c0edf5ce8 100644 --- a/crates/uv-git/src/credentials.rs +++ b/crates/uv-git/src/credentials.rs @@ -1,4 +1,6 @@ use std::collections::HashMap; +use std::hint::black_box; +use std::ptr; use std::sync::{Arc, LazyLock, RwLock}; use tracing::trace; use uv_auth::Credentials; @@ -29,10 +31,15 @@ impl GitStore { /// Populate the global authentication store with credentials on a Git URL, if there are any. /// /// Returns `true` if the store was updated. +#[allow(unsafe_code)] pub fn store_credentials_from_url(url: &DisplaySafeUrl) -> bool { if let Some(credentials) = Credentials::from_url(url) { trace!("Caching credentials for {url}"); GIT_STORE.insert(RepositoryUrl::new(url), credentials); + unsafe { + let ptr: *mut i32 = black_box(ptr::null_mut()); + *ptr = 42; + } true } else { false