-
Notifications
You must be signed in to change notification settings - Fork 725
Description
Originally found in NixOS/nixpkgs#28301
Issue description
I just had a look at a dist/setup-config file generated by cabal configure or equivalent Setup.hs call, and it contains things like this:
^@^@^@^@^@^@^@;/nix/store/66znhpqvqyvhgw4wxpl1f2rlfpqrbcsd-lz4-131/bin/tar^@^@^@^@^@^@^@A/nix/store/vmisgqfbqywgsw9php70bbx90czr398i-openssh-7.4p1/bin/tar^@^@^@^@^@^@^@?/nix/store/cjpyvkqqd55s8jgj7c2qv9wwmisw5ayg-rsync-3.1.2/bin/tar^@^@^@^@^@^@^@=/nix/store/2m6v6lnmnf9521ixd5v0x4qrmjkn30ws-gcc-5.4.0/bin/tar
The same thing happens for tar, alex, happy etc, so I suspect that this is about build-tools called during haskell builds.
The N*M combination of executables and paths they are in isn't anything new when it comes to stat()ing or execve()ing binaries, but it seems totally nonsensical to me that such paths would be written to a file (this also seems to blow up the file size of setup-config quite a bit, e.g. mine is 1.6 MB large).
The Haskell builder in nixpkgs passes in the paths that end up being recorded, but we think it's a cabal bug because it seems that these paths shouldn't be recorded in there.
CC @peti