summaryrefslogtreecommitdiff
path: root/cli/cache/deno_dir.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-29 14:38:18 -0400
committerGitHub <noreply@github.com>2024-05-29 18:38:18 +0000
commit94f040ac2867706d261e2fe1ec8bc2c4263eb6ab (patch)
tree5eaed4d41efd8d25da839bc29b8d32554e1a0fca /cli/cache/deno_dir.rs
parentfada25b0dd593efee496dabb48ed9cb7a9cb6647 (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/deno_dir.rs')
-rw-r--r--cli/cache/deno_dir.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/cli/cache/deno_dir.rs b/cli/cache/deno_dir.rs
index 9f2911f71..00df41c5a 100644
--- a/cli/cache/deno_dir.rs
+++ b/cli/cache/deno_dir.rs
@@ -79,40 +79,46 @@ impl DenoDir {
self.root.display()
}
+ /// Path for the V8 code cache.
+ pub fn code_cache_db_file_path(&self) -> PathBuf {
+ // bump this version name to invalidate the entire cache
+ self.root.join("v8_code_cache_v2")
+ }
+
/// Path for the incremental cache used for formatting.
pub fn fmt_incremental_cache_db_file_path(&self) -> PathBuf {
// bump this version name to invalidate the entire cache
- self.root.join("fmt_incremental_cache_v1")
+ self.root.join("fmt_incremental_cache_v2")
}
/// Path for the incremental cache used for linting.
pub fn lint_incremental_cache_db_file_path(&self) -> PathBuf {
// bump this version name to invalidate the entire cache
- self.root.join("lint_incremental_cache_v1")
+ self.root.join("lint_incremental_cache_v2")
}
/// Path for caching swc dependency analysis.
pub fn dep_analysis_db_file_path(&self) -> PathBuf {
// bump this version name to invalidate the entire cache
- self.root.join("dep_analysis_cache_v1")
+ self.root.join("dep_analysis_cache_v2")
}
/// Path for the cache used for fast check.
pub fn fast_check_cache_db_file_path(&self) -> PathBuf {
// bump this version name to invalidate the entire cache
- self.root.join("fast_check_cache_v1")
+ self.root.join("fast_check_cache_v2")
}
/// Path for caching node analysis.
pub fn node_analysis_db_file_path(&self) -> PathBuf {
// bump this version name to invalidate the entire cache
- self.root.join("node_analysis_cache_v1")
+ self.root.join("node_analysis_cache_v2")
}
/// Path for the cache used for type checking.
pub fn type_checking_cache_db_file_path(&self) -> PathBuf {
// bump this version name to invalidate the entire cache
- self.root.join("check_cache_v1")
+ self.root.join("check_cache_v2")
}
/// Path to the registries cache, used for the lps.
@@ -141,12 +147,6 @@ impl DenoDir {
self.root.join("npm")
}
- /// Path for the V8 code cache.
- pub fn code_cache_db_file_path(&self) -> PathBuf {
- // bump this version name to invalidate the entire cache
- self.root.join("v8_code_cache_v1")
- }
-
/// Path used for the REPL history file.
/// Can be overridden or disabled by setting `DENO_REPL_HISTORY` environment variable.
pub fn repl_history_file_path(&self) -> Option<PathBuf> {