diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-08-08 11:41:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-08 09:41:30 +0000 |
commit | 6fce23c54ec619168eee096fc7bf801d0cec0cb6 (patch) | |
tree | 211d715cf75817a09c63e6dad943d6623eef67f1 /cli/factory.rs | |
parent | 93d479252b5a18e6e782c74b808240bd3ef036bd (diff) |
perf: skip saving to emit cache after first failure (#24896)
Diffstat (limited to 'cli/factory.rs')
-rw-r--r-- | cli/factory.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/factory.rs b/cli/factory.rs index 90dc6dd2e..ed288b22f 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -164,7 +164,7 @@ struct CliFactoryServices { global_http_cache: Deferred<Arc<GlobalHttpCache>>, http_cache: Deferred<Arc<dyn HttpCache>>, http_client_provider: Deferred<Arc<HttpClientProvider>>, - emit_cache: Deferred<EmitCache>, + emit_cache: Deferred<Arc<EmitCache>>, emitter: Deferred<Arc<Emitter>>, fs: Deferred<Arc<dyn deno_fs::FileSystem>>, main_graph_container: Deferred<Arc<MainModuleGraphContainer>>, @@ -492,9 +492,9 @@ impl CliFactory { .get_or_init(|| maybe_file_watcher_reporter) } - pub fn emit_cache(&self) -> Result<&EmitCache, AnyError> { + pub fn emit_cache(&self) -> Result<&Arc<EmitCache>, AnyError> { self.services.emit_cache.get_or_try_init(|| { - Ok(EmitCache::new(self.deno_dir()?.gen_cache.clone())) + Ok(Arc::new(EmitCache::new(self.deno_dir()?.gen_cache.clone()))) }) } |