cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.8k stars 128 forks source link

go web development on windows with modd #13

Closed yoava333 closed 5 years ago

yoava333 commented 8 years ago

I'm trying to use modd for web development on windows:

my modd.conf is:

basic config

@shell = exec

*/.go { prep: go build -o tmp/server.exe -v daemon +sigkill: ./tmp/server.exe }

I'm getting this error: open tmp/server.exe: The process cannot access the file because it is being used by another process.

I've looked with procmon, and it seems that go is unable to rename the file because it's still running. on windows it's not possible to overwrite an executable currently running.

cortesi commented 8 years ago

That's interesting - thanks for reporting the issue. I can think of a lot of inelegant ways to solve this (especially if you did have a shell rather than using exec), but I'd like to come up with something better. Let me ponder it.

frederikhors commented 5 years ago

@yoava333 it works good to me with this and anything else:

**/*.go {
    daemon: go run .
}
cortesi commented 5 years ago

Some time has passed since this issue was reported, and I can't reproduce it. Please let me know if you still see the problem.