hibiken / asynq

Simple, reliable, and efficient distributed task queue in Go
MIT License
10k stars 714 forks source link

Fix go:build for BSD #843

Closed mrusme closed 8 months ago

mrusme commented 8 months ago

I've been running into the following build issue on a project that uses asynq:

  ⨯ release failed after 5m12s               error=failed to build for openbsd_386: exit status 1: # github.com/hibiken/asynq
Error: ../../../go/pkg/mod/github.com/hibiken/asynq@v0.24.1/periodic_task_manager.go:152:8: mgr.s.waitForSignals undefined (type *Scheduler has no field or method waitForSignals)
Error: ../../../go/pkg/mod/github.com/hibiken/asynq@v0.24.1/scheduler.go:212:4: s.waitForSignals undefined (type *Scheduler has no field or method waitForSignals)
Error: ../../../go/pkg/mod/github.com/hibiken/asynq@v0.24.1/server.go:594:6: srv.waitForSignals undefined (type *Server has no field or method waitForSignals)
Error: The process '/opt/hostedtoolcache/goreleaser-action/1.24.0/x64/goreleaser' failed with exit code 1

Upon fruther investigation it appears that the go:build flag bsd is not correct. The go tool dist list command doesn't list any platform named bsd. Hence I believe bsd needs to be replaced with the actual BSD platforms. I don't know whether you would want to include solaris as well, and whether there's anyone using it/able to test it on that platform, hence I left it out.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.41%. Comparing base (38f7499) to head (b25d10b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #843 +/- ## ======================================= Coverage 68.41% 68.41% ======================================= Files 27 27 Lines 3841 3841 ======================================= Hits 2628 2628 Misses 929 929 Partials 284 284 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mrusme commented 8 months ago

Tested, works!