Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pnpm/pacquet
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0d594da3233c821a7884e6bc1beda51208636156
Choose a base ref
..
head repository: pnpm/pacquet
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ac2c01cae2e30381e85dce3b20f5d5325abe789e
Choose a head ref
Showing with 7 additions and 2 deletions.
  1. +7 −2 crates/tarball/src/lib.rs
9 changes: 7 additions & 2 deletions crates/tarball/src/lib.rs
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@ use std::{
collections::HashMap,
ffi::OsString,
io::{Cursor, Read},
mem::drop,
path::PathBuf,
sync::Arc,
time::UNIX_EPOCH,
mem::drop,
};

use base64::{engine::general_purpose::STANDARD as BASE64_STD, Engine};
@@ -153,7 +153,12 @@ impl<'a> DownloadTarballToStore<'a> {
.pipe(CacheValue::InProgress)
.pipe(RwLock::new)
.pipe(Arc::new);
if mem_cache.write().await.insert(package_url.to_string(), Arc::clone(&cache_lock)).is_some() {
if mem_cache
.write()
.await
.insert(package_url.to_string(), Arc::clone(&cache_lock))
.is_some()
{
tracing::warn!(target: "pacquet::download", ?package_url, "Race condition detected when writing to cache");
}
let cas_paths = self.run_without_mem_cache().await?.pipe(Arc::new);