W-23599683: Exclude *.debug from native-lib package staging - #146
Merged
Conversation
GraalVM native-image builds with debug=true, which on Linux emits a
separate DWARF debug-info file (dwlib.so.debug) alongside dwlib.so. The
stagePythonNativeLib and stageNodeNativeLib Copy tasks glob include('dwlib.*'),
which also matches dwlib.so.debug — so the debug file leaked into both the
distributed Python wheel and the Node .tgz.
That file is dev-only crash-symbolication data the runtime never loads;
shipping it only bloats the distributables. Add exclude('*.debug') to both
staging tasks so only the runtime library (and header) are packaged. The
debug file stays in build/native/nativeCompile for local debugging.
Note: only reproducible on Linux CI — macOS produces a .dSYM bundle rather
than a .debug file, so the leak isn't visible in local macOS builds.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
martincousido
approved these changes
Jul 28, 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.
Problem
native-libbuilds the GraalVM native image withdebug = true(seegraalvmNativeblock innative-lib/build.gradle). On Linux, native-image emits a separate DWARF debug-info file —dwlib.so.debug— alongside the runtime librarydwlib.so.Both staging tasks copy the library into their binding packages with the glob
include('dwlib.*'):stagePythonNativeLib→python/src/dataweave/native/stageNodeNativeLib→node/native/dwlib.*also matchesdwlib.so.debug, so the debug file leaks into both the distributed Python wheel and the Node.tgz. It's dev-only crash-symbolication data the runtime never loads — shipping it just bloats the distributables consumers download.Fix
Add
exclude('*.debug')to both stagingfrom(...) { }blocks. Only the runtime library (dwlib.so/.dylib/.dll) and header ship; the.debugfile stays inbuild/native/nativeCompile/for local debugging.This is intentionally minimal —
debug = trueis left as-is, so developers keep the debug info in the build dir; we just stop packaging it.Verification caveat
This is only reproducible on Linux CI. macOS
native-imageproduces a.dSYMbundle (a directory, not adwlib.*.debugfile), so the leak never appears in local macOS builds — and.dSYMisn't matched bydwlib.*anyway. Confidence rests on the glob semantics; the first Linux CI run will confirm the.debugfile is absent from the wheel and tgz.Blast radius
stripNativeLibrary(which runsstripon the primary lib) is unaffected — it never touched the separate.debugfile.🤖 Generated with Claude Code