diff --git a/crates/red_knot/src/watch/watcher.rs b/crates/red_knot/src/watch/watcher.rs index 6e9f712302..58a88f39a0 100644 --- a/crates/red_knot/src/watch/watcher.rs +++ b/crates/red_knot/src/watch/watcher.rs @@ -240,7 +240,7 @@ impl Debouncer { } ModifyKind::Data(_) => ChangeEvent::Changed { - kind: ChangedKind::FileMetadata, + kind: ChangedKind::FileContent, path, }, diff --git a/crates/red_knot/tests/file_watching.rs b/crates/red_knot/tests/file_watching.rs index 1396c56c2b..6d0cac87cf 100644 --- a/crates/red_knot/tests/file_watching.rs +++ b/crates/red_knot/tests/file_watching.rs @@ -265,6 +265,8 @@ fn changed_file() -> anyhow::Result<()> { let changes = case.stop_watch(); + assert!(!changes.is_empty()); + case.db_mut().apply_changes(changes); assert_eq!(source_text(case.db(), foo).as_str(), "print('Version 2')");