@@ -146,16 +146,20 @@ async fn async_watch(
146
146
) => {
147
147
// if we are going to do a full compile, we don't need to bother marking
148
148
// 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) ;
149
150
needs_compile_type = CompileType :: Full ;
150
151
}
151
152
152
153
(
153
154
CompileType :: None | CompileType :: Incremental ,
154
155
// 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 ) ,
156
159
) => {
157
160
// if we are going to compile incrementally, we need to mark the exact files
158
161
// dirty
162
+ log:: debug!( "received {:?} while needs_compile_type was {needs_compile_type:?} -> incremental compile" , event. kind) ;
159
163
if let Ok ( canonicalized_path_buf) = path_buf
160
164
. canonicalize ( )
161
165
. map ( StrippedVerbatimPath :: to_stripped_verbatim_path)
@@ -208,7 +212,6 @@ async fn async_watch(
208
212
// these are not relevant events for compilation
209
213
EventKind :: Access ( _)
210
214
| EventKind :: Other
211
- | EventKind :: Modify ( ModifyKind :: Any )
212
215
| EventKind :: Modify ( ModifyKind :: Metadata ( _) )
213
216
| EventKind :: Modify ( ModifyKind :: Other ) ,
214
217
) => ( ) ,
@@ -217,6 +220,11 @@ async fn async_watch(
217
220
}
218
221
}
219
222
}
223
+
224
+ if needs_compile_type != CompileType :: None {
225
+ log:: debug!( "doing {needs_compile_type:?}" ) ;
226
+ }
227
+
220
228
match needs_compile_type {
221
229
CompileType :: Incremental => {
222
230
let timing_total = Instant :: now ( ) ;
@@ -316,6 +324,9 @@ pub fn start(
316
324
317
325
let mut watcher = RecommendedWatcher :: new ( move |res| producer. push ( res) , Config :: default ( ) )
318
326
. expect ( "Could not create watcher" ) ;
327
+
328
+ log:: debug!( "watching {folder}" ) ;
329
+
319
330
watcher
320
331
. watch ( folder. as_ref ( ) , RecursiveMode :: Recursive )
321
332
. expect ( "Could not start watcher" ) ;
0 commit comments