Skip to content

make watch (air) concurrent process problem #24845

Closed
@wxiaoguang

Description

@wxiaoguang

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/buildPR changes how Gitea is built, i.e. regarding Docker or the Makefiletype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions