Use stable environments for remote and stdin scripts (#11364)

## Summary

This is a follow-on to #11347 to use a stable directory for remote and
stdin scripts. The annoying piece here was figuring out what to use as
the cache key. For remote scripts, I'm using the URL; for stdin scripts,
there isn't any identifying information, so I'm just using a hash of the
metadata.
This commit is contained in:
Charlie Marsh
2025-02-11 19:54:46 -05:00
committed by GitHub
parent 79ad7a1ab9
commit 1cd9c37151
8 changed files with 161 additions and 199 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
use owo_colors::OwoColorize;
use std::borrow::Cow;
use std::env;
use std::fmt;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use owo_colors::OwoColorize;
use tracing::debug;
use uv_cache::Cache;
use uv_cache_key::cache_digest;
use uv_fs::{LockedFile, Simplified};