fix: fallback to no type checking cache when db file can't be created (#15180)

This commit is contained in:
David Sherret 2022-07-12 22:44:15 -04:00 committed by GitHub
parent 61340f1d89
commit 698eeb90fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 26 deletions

View file

@ -661,9 +661,7 @@ async fn create_graph_and_maybe_check(
eprintln!("{}", ignored_options);
}
let maybe_config_specifier = ps.options.maybe_config_file_specifier();
// todo: don't use anything on failure
let cache =
TypeCheckCache::new(&ps.dir.type_checking_cache_db_file_path())?;
let cache = TypeCheckCache::new(&ps.dir.type_checking_cache_db_file_path());
let check_result = emit::check(
&graph.roots,
Arc::new(RwLock::new(graph.as_ref().into())),