Build dmr.exe on Windows in build-dmr target#1006
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider reusing the DMR_EXE variable in the clean target instead of hardcoding both dmr and dmr.exe so the cleanup behavior automatically stays in sync with GOEXE-based naming.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider reusing the DMR_EXE variable in the clean target instead of hardcoding both dmr and dmr.exe so the cleanup behavior automatically stays in sync with GOEXE-based naming.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for building the dmr binary with a .exe extension on Windows by updating the Makefile and README. Feedback suggests replacing the shell call to 'go env GOEXE' with a check on the built-in '$(OS)' variable to avoid unnecessary overhead and potential build failures when Go is not in the PATH.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
The build-dmr Makefile target always built a binary named "dmr", which is unusable on Windows because the OS requires a .exe suffix to execute it directly. Detect Windows via the built-in $(OS) variable and use a DMR_EXE variable for the output filename, so the target produces dmr.exe on Windows and dmr everywhere else. This avoids shelling out to "go env GOEXE" on every invocation, which adds overhead and can fail if go is not on the PATH. Reuse DMR_EXE in the clean target instead of hardcoding both dmr and dmr.exe so cleanup stays in sync with the build output. Update the README to match.
96e2eea to
2020eb5
Compare
doringeman
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
which is unusable on Windows because the OS requires a .exe suffix
to execute it directly
$(OS)variable and use aDMR_EXEvariable for the output filename, so the target producesdmr.exeon Windows anddmreverywhere else. This avoidsshelling out to
go env GOEXEon every invocation, which addsoverhead and can fail if
gois not on the PATHDMR_EXEin thecleantarget instead of hardcoding bothdmranddmr.exeso cleanup stays in sync with the build outputTest plan
make validate-all(go mod tidy, lint, tests w/ race detection, shellcheck) passesmake build-dmrandmake cleanverified locally on macOS