Skip to content

Commit b02056a

Browse files
committed
Add debug output to postgresql postFixup for cycle investigation
Need to understand why remove-references-to isn't preventing the dev↔lib reference cycle. Adding verbose output to show: - Which files exist in the lib output - Which files reference the dev hash before/after stripping
1 parent d475cf4 commit b02056a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

flake.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,23 @@
178178
# through .la files and baked-in paths. Strip dev refs from lib
179179
# since lib is a runtime output that doesn't need dev at runtime.
180180
postFixup = (old.postFixup or "") + ''
181+
echo "=== postFixup: stripping dev refs from lib ==="
182+
echo "lib=$lib"
183+
echo "dev=$dev"
184+
echo "Files in lib:"
185+
find "$lib" -type f | head -20
181186
# Delete .la files from lib — libtool archives embed absolute
182187
# paths to dev headers/libs and are unnecessary for runtime.
183188
find "$lib" -name '*.la' -delete
189+
# Check which files in lib reference dev before stripping.
190+
echo "Files in lib referencing dev hash:"
191+
DEV_HASH=$(echo "$dev" | sed 's|/nix/store/||; s|-.*||')
192+
grep -rl "$DEV_HASH" "$lib" 2>/dev/null || echo " (none found)"
184193
# Strip any remaining references to $dev from the lib output.
185194
find "$lib" -type f -exec remove-references-to -t "$dev" {} +
195+
echo "After stripping, files referencing dev hash:"
196+
grep -rl "$DEV_HASH" "$lib" 2>/dev/null || echo " (none found)"
197+
echo "=== postFixup done ==="
186198
'';
187199
});
188200
});

0 commit comments

Comments
 (0)