Repository navigation
Unify mtime constant used on Unix and Windows - #346
Conversation
cgwalters
left a comment
There was a problem hiding this comment.
There's clearly no reason for them to be different. However, I do have a lingering concern here that some projects may be e.g. checksumming the result of the tar stream produced by HeaderMode::Deterministic and so this could break them.
I'm personally tentatively OK with changing this, but can you hoist this to a const ARBITRARY_DETERMINISTIC_TIMESTAMP that is explicitly shared?
We may also want to consider e.g.
#[cfg(windows)]
pub const PREVIOUS_DETERMINISTIC_TIMESTAMP: <old value>
#[cfg(unix)
pub const PREVIOUS_DETERMINISTIC_TIMESTAMP: <current value>
or so so that anyone who is bit by this can explicitly still use HeaderMode::Deterministic but then also override the time back to the previous value?
Done
I feel uneasy with this because:
|
|
For context, that's how I reacted to this problem in the project I stumbled upon this: |
|
Right. Actually if we were breaking semver I'd argue |
That sounds like the smartest move because it would force people to reason about that timestamp. |
|
Thanks for the PR (and sticking it out through the delay @mkaput) and thanks for the review @cgwalters! |
There's only one notable change here, which is that `Header::Deterministic` on Windows now uses the same timestamp as is used on Unix. If this breaks your use case, please let us know in #346 Besides that, there's a few testing, documentation, and internal cleanups. We're hoping to continue to merge PRs and address issues; this release is small but is intending to maintain momentum. Signed-off-by: Colin Walters <[email protected]>
* Unify `mtime` constant used on Unix and Windows fix composefs#341 * Extract `DETERMINISTIC_TIMESTAMP` (cherry picked from commit dd9123c)
There's only one notable change here, which is that `Header::Deterministic` on Windows now uses the same timestamp as is used on Unix. If this breaks your use case, please let us know in composefs#346 Besides that, there's a few testing, documentation, and internal cleanups. We're hoping to continue to merge PRs and address issues; this release is small but is intending to maintain momentum. Signed-off-by: Colin Walters <[email protected]> (cherry picked from commit 2cb0c7b)
## Summary Ports composefs/tar-rs#346 to `async-tar`.
fix #341