diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-29 14:38:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-29 18:38:18 +0000 |
commit | 94f040ac2867706d261e2fe1ec8bc2c4263eb6ab (patch) | |
tree | 5eaed4d41efd8d25da839bc29b8d32554e1a0fca /cli/cache/mod.rs | |
parent | fada25b0dd593efee496dabb48ed9cb7a9cb6647 (diff) |
fix: bump cache sqlite dbs to v2 for WAL journal mode change (#24030)
In https://github.com/denoland/deno/pull/23955 we changed the sqlite db
journal mode to WAL. This causes issues when someone is running an old
version of Deno using TRUNCATE and a new version because the two fight
against each other.
Diffstat (limited to 'cli/cache/mod.rs')
-rw-r--r-- | cli/cache/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index bb18b1a13..bf68203f0 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -38,6 +38,7 @@ mod module_info; mod node; mod parsed_source; +pub use cache_db::CacheDBHash; pub use caches::Caches; pub use check::TypeCheckCache; pub use code_cache::CodeCache; @@ -101,8 +102,6 @@ pub type LocalLspHttpCache = deno_cache_dir::LocalLspHttpCache<RealDenoCacheEnv>; pub use deno_cache_dir::HttpCache; -use self::module_info::ModuleInfoCacheSourceHash; - /// A "wrapper" for the FileFetcher and DiskCache for the Deno CLI that provides /// a concise interface to the DENO_DIR when building module graphs. pub struct FetchCacher { @@ -297,11 +296,11 @@ impl Loader for FetchCacher { module_info: &deno_graph::ModuleInfo, ) { log::debug!("Caching module info for {}", specifier); - let source_hash = ModuleInfoCacheSourceHash::from_source(source); + let source_hash = CacheDBHash::from_source(source); let result = self.module_info_cache.set_module_info( specifier, MediaType::from_specifier(specifier), - &source_hash, + source_hash, module_info, ); if let Err(err) = result { |