basecamp / thruster

MIT License
672 stars 16 forks source link

Use `-trimpath` on dist builds #24

Closed kevinmcconnell closed 2 months ago

kevinmcconnell commented 2 months ago

When building for release, the source paths are not useful in stacktraces. Adding -trimpath excludes them.

Before:

goroutine 1 [running]:
github.com/basecamp/thruster/internal.(*Service).Run(0xc00003df28)
    /home/kevin/work/basecamp/thruster/internal/service.go:42 +0x4d0
main.main()
    /home/kevin/work/basecamp/thruster/cmd/thrust/main.go:25 +0xa5

After:

goroutine 1 [running]:
github.com/basecamp/thruster/internal.(*Service).Run(0xc00003df28)
    github.com/basecamp/thruster/internal/service.go:42 +0x4d0
main.main()
    github.com/basecamp/thruster/cmd/thrust/main.go:25 +0xa5

Fixes #21.

exegeteio commented 2 months ago

Thank you, @kevinmcconnell. This looks much clearer. Sorry I couldn't get back to it quickly enough. =-[

kevinmcconnell commented 2 months ago

No worries, @exegeteio! Thanks for reporting it! 🙏