From 563d30cfad155dd3f6bff0398faadc0e5ad77f9d Mon Sep 17 00:00:00 2001 From: mlischetti Date: Tue, 28 Jul 2026 16:46:02 -0300 Subject: [PATCH] Exclude *.debug from native-lib package staging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- native-lib/build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/native-lib/build.gradle b/native-lib/build.gradle index 95ed3af..8da7f0c 100644 --- a/native-lib/build.gradle +++ b/native-lib/build.gradle @@ -119,6 +119,10 @@ tasks.register('stagePythonNativeLib', Copy) { dependsOn tasks.named('stripNativeLibrary') from("${layout.buildDirectory.get().asFile}/native/nativeCompile") { include('dwlib.*') + // Exclude GraalVM's separate debug-info file (e.g. dwlib.so.debug on Linux): + // it's dev-only crash-symbolication data the runtime never loads, and would + // otherwise bloat the distributed wheel. Kept in the build dir for debugging. + exclude('*.debug') } into("${projectDir}/python/src/dataweave/native") } @@ -160,6 +164,10 @@ tasks.register('stageNodeNativeLib', Copy) { dependsOn tasks.named('stripNativeLibrary') from("${layout.buildDirectory.get().asFile}/native/nativeCompile") { include('dwlib.*') + // Exclude GraalVM's separate debug-info file (e.g. dwlib.so.debug on Linux): + // it's dev-only crash-symbolication data the runtime never loads, and would + // otherwise bloat the packed .tgz. Kept in the build dir for debugging. + exclude('*.debug') } into("${projectDir}/node/native") }