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.
This commit is contained in:
Joe 2026-03-06 18:32:13 -06:00
parent 0fb5c8776e
commit 14d4bc134d

View file

@ -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,