You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The taskfile is in root of the project and there's a folder ./app and a file ./app/main.go
When I run it with go-task -v dev, it echos hello as I've asked it to, but when I save the main.go (whether or not I made any change) I get:
task: received watch event: WRITE "E:\\<pathtoproject>\\app\\main.go"
task: skipped for file not in sources: app\main.go
I've tried changing sources to these variants and more that I can't remember right now:
'app/main.go'
**/*.go
./app/main.go
./app/**/*.go
"./{{.APPFOLDER}}/main.go' (APPFOLDER set to app)
and so on...
What I expect:
I expect it to echo hello every time I save the main.go file, I don't know what version it stopped working or if my OS (win11) have changed something with watching files.
task: Started watching for tasks: dev
task: "dev" started
task: watching new dir: app
task: [dev] echo hello
hello
task: "dev" finished
task: task "dev" finished running
task: received watch event: WRITE "E:\\syncthing\\devprojects\\golang\\kasta\\app\\main.go"
task: skipped for file not in sources: app\main.go
Maybe you're right, but none of the descriptions on those issues/PRs sufficiently overlaps this problem. The only similarity is that there's a problem with watch.
Its possible that event.Name needs to be "normalised" to a linux like path, i.e. whatever form is in files. The files come via the glob mechanism of the mvdan.cc (linux bash emulation) and would have "/".
I would like to know if this is planned so that go-task would support Windows again. If it's not planned we'll just continue using something else and stop coming back to follow up. Could also be nice to be clear in the description of this tool.
Activity
trulede commentedon May 30, 2026
@TTSKarlsson try PR #2743 or #2754.
TTSKarlsson commentedon May 30, 2026
Maybe you're right, but none of the descriptions on those issues/PRs sufficiently overlaps this problem. The only similarity is that there's a problem with watch.
I'll wait this out and use nodemon in the mean. 👍
Edd532 commentedon Jul 3, 2026
I've also have this exact issue - also on Windows. I believe here: https://github.com/go-task/task/blob/main/watch.go#L104
That
event.Namecontains\while thefilescontain/TTSKarlsson commentedon Aug 18, 2026
I got back to trying this again in another project, but it's as Edd532 says, it doesn't seem to normalize paths when comparing.
- '**\\*.go'and
- '**/*.go'makes no difference.
trulede commentedon Aug 18, 2026
Its possible that
event.Nameneeds to be "normalised" to a linux like path, i.e. whatever form is infiles. Thefilescome via the glob mechanism of the mvdan.cc (linux bash emulation) and would have "/".TTSKarlsson commentedon Sep 9, 2026
I would like to know if this is planned so that go-task would support Windows again. If it's not planned we'll just continue using something else and stop coming back to follow up. Could also be nice to be clear in the description of this tool.
pd93 commentedon Sep 10, 2026
@TTSKarlsson If able, please try out #3028. Hopefully fixes your issue.
TTSKarlsson commentedon Sep 16, 2026
A bit late to getting back. Just to confirm this did fix the problem. Thanks!