Revert "change needed to preserve permissions in astral-tokio-tar"#1261
Revert "change needed to preserve permissions in astral-tokio-tar"#1261
Conversation
This reverts commit 5af1623.
There was a problem hiding this comment.
Pull request overview
Reverts the tar extraction implementation to avoid astral-tokio-tar panicking on some existing BSD tar archives by switching back to tokio-tar.
Changes:
- Replace
tokio_tar::ArchiveBuilderusage withtokio_tar::Archivein install and pantry sync extraction paths. - Swap
astral-tokio-tardependency fortokio-tarincrates/lib. - Update
Cargo.lockto reflect the dependency change and resulting resolver changes.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
crates/lib/src/sync.rs |
Switch pantry tar extraction from ArchiveBuilder to Archive. |
crates/lib/src/install.rs |
Switch package tar extraction from ArchiveBuilder to Archive. |
crates/lib/Cargo.toml |
Replace astral-tokio-tar with tokio-tar = 0.3.1. |
Cargo.lock |
Lockfile changes reflecting the tar crate swap and broader dependency graph changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let mut archive = ArchiveBuilder::new(decoder) | ||
| .set_preserve_permissions(true) | ||
| .build(); | ||
| let mut archive = Archive::new(decoder); |
There was a problem hiding this comment.
This extraction path no longer explicitly enables permission preservation (previously set_preserve_permissions(true)). If tokio-tar doesn’t preserve modes by default, installed package files may lose executable bits (eg bin/*). Consider restoring equivalent configuration (if supported by tokio-tar) or adding an explicit post-extract permission fix/regression check so installs remain runnable.
| let mut archive = Archive::new(decoder); | |
| let mut archive = Archive::new(decoder); | |
| archive.set_preserve_permissions(true); |
| let mut archive = ArchiveBuilder::new(decoder) | ||
| .set_preserve_permissions(true) | ||
| .build(); | ||
| let mut archive = Archive::new(decoder); |
There was a problem hiding this comment.
This extraction no longer explicitly preserves permissions (previously set_preserve_permissions(true)). If tokio-tar’s default behavior differs, the pantry contents on disk could end up with different modes than expected. Consider restoring an explicit preserve-permissions setting (if available) or otherwise ensuring the extracted file modes remain unchanged.
| let mut archive = Archive::new(decoder); | |
| let mut archive = Archive::new(decoder); | |
| archive.set_preserve_permissions(true); |
astral-tokio-tar panics on some of our existing BSD tar archives, unfortunately.