@@ -146,16 +146,20 @@ async fn async_watch(
146146 ) => {
147147 // if we are going to do a full compile, we don't need to bother marking
148148 // files dirty because we do a full scan anyway
149+ log:: debug!( "received {:?} while needs_compile_type was {needs_compile_type:?} -> full compile" , event. kind) ;
149150 needs_compile_type = CompileType :: Full ;
150151 }
151152
152153 (
153154 CompileType :: None | CompileType :: Incremental ,
154155 // when we have a data change event, we can do an incremental compile
155- EventKind :: Modify ( ModifyKind :: Data ( _) ) ,
156+ EventKind :: Modify ( ModifyKind :: Data ( _) ) |
157+ // windows sends ModifyKind::Any on file content changes
158+ EventKind :: Modify ( ModifyKind :: Any ) ,
156159 ) => {
157160 // if we are going to compile incrementally, we need to mark the exact files
158161 // dirty
162+ log:: debug!( "received {:?} while needs_compile_type was {needs_compile_type:?} -> incremental compile" , event. kind) ;
159163 if let Ok ( canonicalized_path_buf) = path_buf
160164 . canonicalize ( )
161165 . map ( StrippedVerbatimPath :: to_stripped_verbatim_path)
@@ -208,7 +212,6 @@ async fn async_watch(
208212 // these are not relevant events for compilation
209213 EventKind :: Access ( _)
210214 | EventKind :: Other
211- | EventKind :: Modify ( ModifyKind :: Any )
212215 | EventKind :: Modify ( ModifyKind :: Metadata ( _) )
213216 | EventKind :: Modify ( ModifyKind :: Other ) ,
214217 ) => ( ) ,
@@ -217,6 +220,11 @@ async fn async_watch(
217220 }
218221 }
219222 }
223+
224+ if needs_compile_type != CompileType :: None {
225+ log:: debug!( "doing {needs_compile_type:?}" ) ;
226+ }
227+
220228 match needs_compile_type {
221229 CompileType :: Incremental => {
222230 let timing_total = Instant :: now ( ) ;
@@ -316,6 +324,9 @@ pub fn start(
316324
317325 let mut watcher = RecommendedWatcher :: new ( move |res| producer. push ( res) , Config :: default ( ) )
318326 . expect ( "Could not create watcher" ) ;
327+
328+ log:: debug!( "watching {folder}" ) ;
329+
319330 watcher
320331 . watch ( folder. as_ref ( ) , RecursiveMode :: Recursive )
321332 . expect ( "Could not start watcher" ) ;
0 commit comments