Skip to content

Conversation

@jakebailey
Copy link
Member

I want to be able to produce "real" release binaries, with stripping and trimming.

Shift stuff around to make that possible. Since --release is sort of overlapping with the build tag release, I renamed that to nodebug, matching noembed.

Copilot AI review requested due to automatic review settings January 24, 2026 00:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a --release flag to enable building production-ready binaries with debug information stripped and code trimmed. To avoid naming conflicts, the existing build tag release is renamed to nodebug to better align with the existing noembed tag naming convention.

Changes:

  • Renamed the release build tag to nodebug in Go build constraint comments
  • Added a --release command-line flag option
  • Extracted release build flag generation into a reusable getReleaseBuildFlags() function
  • Updated build processes to use the new release flag and function

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/debug/release.go Updated build constraint from release to nodebug
internal/debug/debug.go Updated negated build constraint to use !nodebug
Herebyfile.mjs Added --release flag, extracted getReleaseBuildFlags() function, and updated build processes

@rubiesonthesky
Copy link

nodebug seems logical flag, but without context, it’s easy to read it as “node bug” 🐛 probably no harm, just funny coincidence.

@jakebailey
Copy link
Member Author

Yes, I thought that was funny.

Can't think of a better name, though. I could probably just leave it as release but we haven't had any reasons to flip code around in release mode (usually a bad idea, I am questioning us doing it still).

@jakebailey
Copy link
Member Author

Thinking more, we should have a --nodebug like --noembed, except that aliases another flag too. So, it's probably a bad build tag name and release was fine. Maybe...

@jakebailey jakebailey marked this pull request as draft January 26, 2026 16:54
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.

4 participants