fix: bad root change cause incorrect vfs cache frequently (#1661)

This commit is contained in:
Myriad-Dreamin 2025-04-16 12:54:34 +08:00 committed by GitHub
parent 2709aaf429
commit 979e0b2a55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -400,7 +400,7 @@ impl<F: CompilerFeat> RevisingUniverse<'_, F> {
self.view_changed = true;
// Resets the cache if the workspace root has changed.
let root_changed = self.inner.entry.workspace_root() == state.workspace_root();
let root_changed = self.inner.entry.workspace_root() != state.workspace_root();
if root_changed {
log::info!("resetting shadow root_changed");
self.vfs().reset_cache();