mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Revert "fix(cli) Better error messages on corrupt databases that aren… (#18337)
…'t automatically re-created (#18330)"
This reverts commit 2ef8269fdb
.
Printing these messages by default (instead of requiring `-L debug`
flag) caused
various tests to start printing it and mismatch in output assertions.
This commit is contained in:
parent
0b4770fa7d
commit
7d9653d51f
2 changed files with 3 additions and 13 deletions
9
cli/cache/node.rs
vendored
9
cli/cache/node.rs
vendored
|
@ -106,16 +106,11 @@ impl NodeAnalysisCache {
|
|||
) {
|
||||
Ok(cache) => Some(cache),
|
||||
Err(err) => {
|
||||
let file = self
|
||||
.db_file_path
|
||||
.as_ref()
|
||||
.map(|s| s.to_string_lossy().to_string())
|
||||
.unwrap_or_default();
|
||||
log::error!("Error creating node analysis cache, file '{file}' may be corrupt: {:#}", err);
|
||||
// should never error here, but if it ever does don't fail
|
||||
if cfg!(debug_assertions) {
|
||||
panic!("Error creating node analysis cache, file '{file}' may be corrupt: {err:#}");
|
||||
panic!("Error creating node analysis cache: {err:#}");
|
||||
} else {
|
||||
log::debug!("Error creating node analysis cache: {:#}", err);
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
7
cli/cache/parsed_source.rs
vendored
7
cli/cache/parsed_source.rs
vendored
|
@ -121,12 +121,7 @@ impl ParsedSourceCache {
|
|||
) {
|
||||
Ok(analyzer) => Box::new(analyzer),
|
||||
Err(err) => {
|
||||
let file = self
|
||||
.db_cache_path
|
||||
.as_ref()
|
||||
.map(|s| s.to_string_lossy().to_string())
|
||||
.unwrap_or_default();
|
||||
log::error!("Could not create cached module analyzer, cache file '{file}' may be corrupt: {:#}", err);
|
||||
log::debug!("Could not create cached module analyzer. {:#}", err);
|
||||
// fallback to not caching if it can't be created
|
||||
Box::new(deno_graph::CapturingModuleAnalyzer::new(
|
||||
None,
|
||||
|
|
Loading…
Reference in a new issue