Enhance path handling in ChangeProcessor and snapshot_project

- Canonicalized the project_root in ChangeProcessor to ensure consistent path comparisons on Windows, addressing issues with the \\?\ prefix.
- Updated snapshot_project to push canonicalized paths to relevant_paths, improving path accuracy in project snapshots.

These changes enhance the reliability of path handling in the project and improve overall consistency in file operations.
This commit is contained in:
Joe 2026-02-15 02:54:07 -06:00
parent e023a0d3f8
commit d05ad92c84
2 changed files with 12 additions and 3 deletions

View file

@ -147,7 +147,10 @@ pub fn snapshot_project(
// We SHOULD NOT mark the project file as a relevant path for any
// nodes that aren't roots. They'll be updated as part of the project
// file being updated.
snapshot.metadata.relevant_paths.push(path.to_path_buf());
snapshot
.metadata
.relevant_paths
.push(vfs.canonicalize(path)?);
Ok(Some(snapshot))
}