Skip to content

Conversation

@e-nomem
Copy link

@e-nomem e-nomem commented Nov 21, 2025

Implementation for #422

This is a breaking change to the library.

@xzfc
Copy link
Collaborator

xzfc commented Nov 23, 2025

There are two different changes:

  1. Split EntryType::Regular into LegacyRegular and Regular.
  2. Use b'0' instead of b'\0' by default in new_gnu and new_ustar.

In the wild (see grep.app) I see many uses of checks like if header.entry_type() != tar::EntryType::Regular. The first change would silently break such code, i.e. no compile error, but runtime behavior would change. Can it be designed in a non-breaking way?

The second change is less drastic, but still I'd prefer not to change the output across tar-rs versions within 0.4.x version range.

@e-nomem
Copy link
Author

e-nomem commented Nov 23, 2025

I suppose we could make EntryType::Regular into a tuple or struct variant with some information about if it's a 'legacy' regular file or not? That would break any code matching against EntryType::Regular so it doesn't silently fail.

@xzfc
Copy link
Collaborator

xzfc commented Nov 23, 2025

That still would be a a semver violation.

@xzfc xzfc added the breaking-change-wishlist Breaking changes that could be including in the next SemVer-incompatible release. label Nov 24, 2025
@e-nomem
Copy link
Author

e-nomem commented Nov 24, 2025

Yeah, this PR basically has to be breaking because of the change in the encoded default entry type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change-wishlist Breaking changes that could be including in the next SemVer-incompatible release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants