Recently, the tar crate got support for creating archives with sparse entries (composefs/tar-rs#375). It is going to be enabled by default in the next release.
For Cargo (which depends on this crate), keeping the default would mean that some very old versions of Cargo would not be able to read some archives created by the latest Cargo. Specifically, the ability to read sparse entries was added in tar 0.4.6 (released 2016-06-09). The corresponding tar-rs bump for Cargo was #2973, which is included in Cargo 0.13 which is included in rust 1.12.
The sparseness check does not affect Rust source files (as text files generally do not contain large chunks of null bytes), but it may affect crates containing binary files. For example, protobuf-build and metal crates contain binaries that could possibly be sparse. The command rg -ca '\x00{4096}' ~/.cargo/registry/ might reveal other similar binaries.
I'm creating this issue at the request of @alexcrichton to let the Cargo team decide whether to
- keep the new default as-is, or
- add a few
ar.sparse(false) calls explicitly everywhere tar::Builder is used.
Recently, the
tarcrate got support for creating archives with sparse entries (composefs/tar-rs#375). It is going to be enabled by default in the next release.For Cargo (which depends on this crate), keeping the default would mean that some very old versions of Cargo would not be able to read some archives created by the latest Cargo. Specifically, the ability to read sparse entries was added in
tar0.4.6(released 2016-06-09). The correspondingtar-rsbump for Cargo was #2973, which is included in Cargo0.13which is included in rust1.12.The sparseness check does not affect Rust source files (as text files generally do not contain large chunks of null bytes), but it may affect crates containing binary files. For example,
protobuf-buildandmetalcrates contain binaries that could possibly be sparse. The commandrg -ca '\x00{4096}' ~/.cargo/registry/might reveal other similar binaries.I'm creating this issue at the request of @alexcrichton to let the Cargo team decide whether to
ar.sparse(false)calls explicitly everywheretar::Builderis used.