v -watch: rerun compilation after `v self` too

pull/9608/head
Delyan Angelov 2021-04-05 11:04:31 +03:00
parent 7a9607b028
commit 3ea9868d0e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ fn (mut context Context) get_stats_for_affected_vfiles() []VFileStat {
newstats << VFileStat{fullpath, mtime}
}
}
// always add the v compiler itself, so that if it is recompiled with `v self`
// the watcher will rerun the compilation too
newstats << VFileStat{context.vexe, os.file_last_mod_unix(context.vexe)}
return newstats
}