Skip to content
New issue

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

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

Already on GitHub? # to your account

Use -trimpath on dist builds #24

Merged
merged 1 commit into from
May 1, 2024
Merged

Conversation

kevinmcconnell
Copy link
Collaborator

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.

When building for release, the source paths are not useful in
stacktraces. Adding `-trimpath` excludes them.
@kevinmcconnell kevinmcconnell merged commit c19ae78 into main May 1, 2024
1 check passed
@kevinmcconnell kevinmcconnell deleted the trim-paths-in-dist-build branch May 1, 2024 12:04
@exegeteio
Copy link

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

@kevinmcconnell
Copy link
Collaborator Author

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kevin's local build directory being shown?
2 participants