Skip to content

W-23599683: Exclude *.debug from native-lib package staging - #146

Merged
mlischetti merged 1 commit into
masterfrom
fix/exclude-debug-from-native-packages
Jul 28, 2026
Merged

W-23599683: Exclude *.debug from native-lib package staging#146
mlischetti merged 1 commit into
masterfrom
fix/exclude-debug-from-native-packages

Conversation

@mlischetti

Copy link
Copy Markdown
Contributor

Problem

native-lib builds the GraalVM native image with debug = true (see graalvmNative block in native-lib/build.gradle). On Linux, native-image emits a separate DWARF debug-info file — dwlib.so.debug — alongside the runtime library dwlib.so.

Both staging tasks copy the library into their binding packages with the glob include('dwlib.*'):

  • stagePythonNativeLibpython/src/dataweave/native/
  • stageNodeNativeLibnode/native/

dwlib.* also matches dwlib.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 staging from(...) { } blocks. Only the runtime library (dwlib.so/.dylib/.dll) and header ship; the .debug file stays in build/native/nativeCompile/ for local debugging.

This is intentionally minimal — debug = true is 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-image produces a .dSYM bundle (a directory, not a dwlib.*.debug file), so the leak never appears in local macOS builds — and .dSYM isn't matched by dwlib.* anyway. Confidence rests on the glob semantics; the first Linux CI run will confirm the .debug file is absent from the wheel and tgz.

Blast radius

  • Staging-only change; no runtime, API, or binding-code impact.
  • stripNativeLibrary (which runs strip on the primary lib) is unaffected — it never touched the separate .debug file.

🤖 Generated with Claude Code

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>
@mlischetti
mlischetti requested a review from a team as a code owner July 28, 2026 19:46
@mlischetti mlischetti changed the title Exclude *.debug from native-lib package staging W-23599683: Exclude *.debug from native-lib package staging Jul 28, 2026
@mlischetti
mlischetti merged commit a38a262 into master Jul 28, 2026
4 checks passed
@mlischetti
mlischetti deleted the fix/exclude-debug-from-native-packages branch July 28, 2026 22:40
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.

2 participants