Fix RUST builds copying non-.node binaries with wrong name#106
Merged
Conversation
The RUST=true code path scans all files from build/Release/ and
applies prebuildFilename() to generate output names. This works for
.node libraries but incorrectly renames plain binaries (e.g.
crashtracker-receiver) by adding a -napi.node suffix.
The old pre-PR#90 code used .replace('.node', '-napi.node') which was
a no-op for files without .node in their name, preserving binaries
as-is. The refactored code unconditionally applied the naming
convention.
Fix: only apply prebuildFilename() to .node files; copy other files
with their original name.
Fixes crashtracker test failures in DataDog/libdatadog-nodejs#106.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tlhunter
approved these changes
Mar 23, 2026
1e603b3 to
3d96784
Compare
tlhunter
approved these changes
Mar 23, 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
RUST=truecode path scans all files frombuild/Release/and appliesprebuildFilename()to generate output names.nodelibraries but incorrectly renames plain binaries (e.g.crashtracker-receiverbecomescrashtracker-receiver-napi.node).replace('.node', '-napi.node')which was a no-op for files without.node, preserving binaries as-isprebuildFilename()to.nodefiles; copy other files with their original nameContext
Discovered via DataDog/libdatadog-nodejs#106 — the crashtracker tests fail because
crashtracker-receiverbinary gets renamed and can't be found at runtime byload.js.Test plan
🤖 Generated with Claude Code
Jira: PROF-14113