Closed toga4 closed 12 months ago
Confirmed this change works as expected (on M1 Mac).
Hi, @cosmtrek @xiantang Is there any chance you could review this PR? I'd appreciate your feedback.
Hope the PR can be merged soon @cosmtrek @xiantang. thx!
I know the root cause now, it's because when you save your code in a short period of time, air will start duplicate processes, but doesn't have any lock for it. thank you good catch bug
Hi maintainers, this PR fixes the behavior that air duplicates processses when multiple buildRuns run simultaneously. Closes #404, Closes #421, Closes #426.
To reproduce issue:
main.go
Run
air -d
and save a file multiple times in a short period of time, then air executes multiple processes.This behavior appears from v1.41.0, and seems to be brought by the following pull request.
363
I looked into what was making the difference, and it seems that the following code that was in place before the change was important. https://github.com/cosmtrek/air/blob/d0a697adcf852559ab6fff59aa164b18f62571a0/runner/engine.go#L486-L490
This PR revive that code, and makes