Closed
Description
(I do not use air
, this issue is just for helping debugging developers reported problem)
It seems that the make watch
may not work well in some cases:
air logs:
main.go has changed !!! The first change and build
building...
Running go generate...
... go build ... -o gitea
main.go has changed !!! The second change and build
building...
running...
Running go generate...
2023/05/22 11:45:44 cmd/web.go:123:runWeb() [I] Starting Gitea on PID: 90706
...
... go build ... -o gitea
...
running...
2023/05/22 11:45:46 cmd/web.go:123:runWeb() [I] Starting Gitea on PID: 90768
If a file is changed when a build is in progress, air doesn't stop the old build, then two Gitea processes will be started.
Two running Gitea processes will conflict with each other: port listen, leveldb lock, etc.