diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-02-03 19:15:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-03 20:15:16 +0100 |
commit | a635c9700c0b99c3ad128c21727fdcfb23bad72f (patch) | |
tree | b31e457547346bd979df45579ca62186ee6027f2 /cli/cache/parsed_source.rs | |
parent | b16a958c4f01a1d27d14a6a1d8785c54449a5087 (diff) |
refactor: reland "preserve ProcState::file_fetcher between restarts" (#17636)
Just some watcher init step that I thought would be "cloned over" but
needs to be done again on reset.
Diffstat (limited to 'cli/cache/parsed_source.rs')
-rw-r--r-- | cli/cache/parsed_source.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/cache/parsed_source.rs b/cli/cache/parsed_source.rs index 30eecf702..6385e7384 100644 --- a/cli/cache/parsed_source.rs +++ b/cli/cache/parsed_source.rs @@ -67,6 +67,14 @@ impl ParsedSourceCache { } } + pub fn reset_for_file_watcher(&self) -> Self { + Self { + db_cache_path: self.db_cache_path.clone(), + cli_version: self.cli_version.clone(), + sources: Default::default(), + } + } + pub fn get_parsed_source_from_module( &self, module: &deno_graph::Module, |