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/graph_util.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/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 30b426667..3c5545a50 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -71,7 +71,7 @@ pub struct GraphData { impl GraphData { /// Store data from `graph` into `self`. - pub fn add_graph(&mut self, graph: &ModuleGraph, reload: bool) { + pub fn add_graph(&mut self, graph: &ModuleGraph) { for graph_import in &graph.imports { for dep in graph_import.dependencies.values() { for resolved in [&dep.maybe_code, &dep.maybe_type] { @@ -90,7 +90,7 @@ impl GraphData { let mut has_npm_specifier_in_graph = false; for (specifier, result) in graph.specifiers() { - if !reload && self.modules.contains_key(specifier) { + if self.modules.contains_key(specifier) { continue; } @@ -477,7 +477,7 @@ impl GraphData { impl From<&ModuleGraph> for GraphData { fn from(graph: &ModuleGraph) -> Self { let mut graph_data = GraphData::default(); - graph_data.add_graph(graph, false); + graph_data.add_graph(graph); graph_data } } @@ -549,7 +549,7 @@ pub async fn create_graph_and_maybe_check( let check_js = ps.options.check_js(); let mut graph_data = GraphData::default(); - graph_data.add_graph(&graph, false); + graph_data.add_graph(&graph); graph_data .check( &graph.roots, |