From 14d4bc134d5c3c80668bb83ec42a86fcd97efb9a Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 6 Mar 2026 18:32:13 -0600 Subject: [PATCH] Update instance context in ServeSession for script synchronization - Modified the `check_tree_freshness` method to set `sync_scripts_only` in the `InstanceContext`, ensuring that the correct synchronization behavior is applied during tree freshness checks. - This change enhances the functionality of the `ServeSession` by allowing for more precise control over script synchronization. --- src/serve_session.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/serve_session.rs b/src/serve_session.rs index cb7c8c9f..60306ad0 100644 --- a/src/serve_session.rs +++ b/src/serve_session.rs @@ -547,7 +547,8 @@ impl ServeSession { pub fn check_tree_freshness(&self) -> TreeFreshnessReport { let start = Instant::now(); let start_path: &Path = &self.root_project.file_location; - let instance_context = InstanceContext::new(); + let mut instance_context = InstanceContext::new(); + instance_context.sync_scripts_only = self.sync_scripts_only(); let snapshot = match snapshot_from_vfs(&instance_context, &self.vfs, start_path) { Ok(s) => s, @@ -610,7 +611,8 @@ impl ServeSession { let start = Instant::now(); let start_path: &Path = &self.root_project.file_location; - let instance_context = InstanceContext::new(); + let mut instance_context = InstanceContext::new(); + instance_context.sync_scripts_only = self.sync_scripts_only(); let snapshot = match snapshot_from_vfs(&instance_context, &self.vfs, start_path) { Ok(s) => s,