Merged
Conversation
PR #90 refactored prebuild output naming into a shared prebuildFilename() function, but the v3 code path hardcoded the "node-{abi}.node" prefix, ignoring the baseName parameter. This broke Rust builds which previously preserved the original binary name from build/Release/ (e.g. "process-discovery-napi.node" became "node-napi.node"), causing consumers like libdatadog-nodejs to fail with "Could not find a {name} binary for {platform}". The fix makes prebuildFilename() use baseName in the v3 path, and passes 'node' from the non-Rust call site to preserve backward compatibility there. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move prebuildDir and prebuildFilename into prebuild/naming.js as pure functions (all dependencies passed as parameters) so they can be tested in isolation. Add test/naming.js covering v3 and v4 naming for both Rust (dynamic baseName) and non-Rust (fixed 'node' prefix) builds. This would have caught the regression in PR #90 where v3 Rust builds lost the original binary name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rochdev
approved these changes
Mar 23, 2026
tlhunter
added a commit
that referenced
this pull request
Mar 23, 2026
Update all 20 internal composite action references from 679d80c (pre-PR#100) to 287165b (current main HEAD). The previous pin predated PR #100 ("Fix v3 prebuild naming for Rust builds"), so the prebuild step was still using the buggy prebuildFilename() that hardcodes `node-napi.node` for v3 builds, ignoring the actual crate name. This caused all Rust binaries to overwrite each other, leaving only one file in the artifact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
tlhunter
added a commit
that referenced
this pull request
Mar 23, 2026
PR #101 unconditionally installs autoconf/automake/libtool in all Alpine Docker builds. The libtool package causes SIGSEGV in Neon Alpine tests. Pin to dfb3666 (PR #100) which includes the v3 naming fix without the autotools change. Consumers that need autotools (e.g. libdatadog-nodejs) already handle this via the `prebuild` input hook. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
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
prebuildFilename()function, but the v3 code path hardcodednode-{abi}.node, ignoring thebaseNameparameterrust: true) which previously preserved the original binary name frombuild/Release/— e.g.process-discovery-napi.nodesilently becamenode-napi.nodeCould not find a {name} binary for {platform}Changes
prebuildFilename()now usesbaseNamein the v3 path (${baseName}-napi.node/${baseName}-${abi}.node)'node'as baseName for v3 (preserving backward compat) andTARGET_NAMEfor v4Test plan
node-{abi}.nodefilenames (v3 default){name}-{abi}.nodefilenames (v3), matching pre-PR#90 behaviord4e8924and verify CI passes🤖 Generated with Claude Code
Jira: PROF-14113