Skip to content

Latest release of vbatts/tar-split pulls archive/tar into an internal unimportable module #1960

@wspurgin

Description

@wspurgin

https://github.com/vbatts/tar-split/releases/tag/v0.12.0

Ran into this issue installing some other package (buf) that relies on this project just a few moments ago during a routine dependency (direct / indirect) bump.

estargz uses this (now internal) package here:

"github.com/vbatts/tar-split/archive/tar"

var tw *tar.Writer
if !lossless {
tw = tar.NewWriter(dst) // use tar writer only when this isn't lossless mode.
}
tr := tar.NewReader(src)
if lossless {
tr.RawAccounting = true
}
prevOffset := w.cw.n
var prevOffsetUncompressed int64
for {
h, err := tr.Next()
if err == io.EOF {
if lossless {
if remain := tr.RawBytes(); len(remain) > 0 {
// Collect the remaining null bytes.
// https://github.com/vbatts/tar-split/blob/80a436fd6164c557b131f7c59ed69bd81af69761/concept/main.go#L49-L53
if _, err := dst.Write(remain); err != nil {
return err
}
}
}
break
}

I'm hopeful, that the upstream archive/tar is a drop in replacement if the use case can be covered by some of the discussion around TeeWriter or other workarounds for low-level byte access.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions