Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change build delay to zero #343

Merged
merged 4 commits into from
Oct 24, 2022
Merged

change build delay to zero #343

merged 4 commits into from
Oct 24, 2022

Conversation

xiantang
Copy link
Collaborator

@xiantang xiantang commented Oct 24, 2022

close #325

@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Merging #343 (f47890a) into master (3be9ef7) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #343   +/-   ##
=======================================
  Coverage   69.77%   69.77%           
=======================================
  Files           7        7           
  Lines         976      976           
=======================================
  Hits          681      681           
  Misses        223      223           
  Partials       72       72           
Impacted Files Coverage Δ
runner/config.go 75.11% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@xiantang xiantang merged commit a2b8871 into master Oct 24, 2022
@silverwind
Copy link
Contributor

with the new delay=0 default, I see multiple concurrent builds when saving a file once on macOS in Sublime Text:

main.go has changed
main.go has changed
building...
building...
main.go has changed
main.go has changed
building...
  >  Building binary...
  >  Building binary...
  >  Building binary...
go build ...
go build ...
go build ...
running...
running...
running...

Maybe this is something specific to macOS, but I'm definitely saving the file only once.

@silverwind
Copy link
Contributor

delay 0 is also very problematic while switching git branches where every changed file triggers a rebuild, I had to revert it to previous value of 1000 in go-gitea/gitea#24290.

silverwind added a commit to go-gitea/gitea that referenced this pull request Apr 23, 2023
air-verse/air#343 has changed air's default
`delay` from 1000 to 0 and since then, while switching git branches, I
notice air starting off multiple parallel build, essentially overloading
my machine. Restore previous value of 1000.

````
building...
routers/web/org/setting_secrets.go has changed
routers/web/org/teams.go has changed
building...
routers/web/org/teams.go has changed
routers/web/repo/setting_secrets.go has changed
building...
routers/web/org/setting_secrets.go has changed
routers/web/repo/setting_secrets.go has changed
building...
routers/web/shared/secrets/secrets.go has changed
routers/web/repo/view.go has changed
building...
routers/web/repo/view.go has changed
routers/web/user/setting/secrets.go has changed
building...
routers/web/shared/secrets/secrets.go has changed
routers/web/user/setting/secrets.go has changed
building...
routers/web/web.go has changed
routers/web/web.go has changed
building...
services/wiki/wiki_path.go has changed
services/wiki/wiki_path.go has changed
building...
...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
Running go generate...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actual refresh time is slower then the air start time. Default build delay to 1ms
2 participants