Make cache non-optional in most crates (#293)

This PR makes the cache non-optional in most of Puffin, which simplifies
the code, allows us to reuse the cache within a single command (even
with `--no-cache`), and also allows us to use the cache for disk storage
across an invocation.

I left the cache as optional for the `Virtualenv` and `InterpreterInfo`
abstractions, since those are generic enough that it seems nice to have
a non-cached version, but it's kind of arbitrary.
This commit is contained in:
Charlie Marsh 2023-11-02 10:40:20 -07:00 committed by GitHub
parent a02bf2e415
commit a4002fe132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 140 additions and 160 deletions

View file

@ -22,7 +22,7 @@ use puffin_traits::BuildContext;
struct DummyContext;
impl BuildContext for DummyContext {
fn cache(&self) -> Option<&Path> {
fn cache(&self) -> &Path {
panic!("The test should not need to build source distributions")
}