Repository navigation
refactor: check if boxo/files.File is io.Seeker - #11254
Merged
Merged
Conversation
3 tasks done
lidel
added a commit
to ipfs/boxo
that referenced
this pull request
May 14, 2026
show the before/after migration pattern for callers and link to ipfs/kubo#11254 as a worked example of updating consumers.
lidel
force-pushed
the
fix/boxo-files-remove-seeker-from-file-interface
branch
from
May 14, 2026 23:30
b26b82c to
3bb4ede
Compare
lidel
added a commit
to ipfs/boxo
that referenced
this pull request
May 15, 2026
* fix(files): remove io.Seeker from File interface Not all File implementations can seek. ReaderFile wrapping an HTTP multipart stream and WebFile both returned ErrNotSupported at runtime, which caused interface-sniffing bugs in downstream consumers like go-car (ipfs/kubo#9361). Seeking is now opt-in: implementations that support it (ReaderFile with a seekable reader, Symlink, ufsFile) still have a Seek method and callers type-assert to io.Seeker when needed. - files: remove io.Seeker from File interface - files: remove dummy WebFile.Seek that always returned ErrNotSupported - gateway: type-assert to io.Seeker before seeking in all handlers * docs: add breaking change to changelog * docs: clarify io.Seeker breaking change in changelog show the before/after migration pattern for callers and link to ipfs/kubo#11254 as a worked example of updating consumers. * docs: expand io.Seeker rationale with go-car workaround example * docs: break Action required onto new line
Update boxo to ipfs/boxo#1128 which removes io.Seeker from the files.File interface. Callers that need seeking now type-assert to io.Seeker. - core/commands/cat: type-assert before seeking - core/coreiface/tests: type-assert before seeking
lidel
force-pushed
the
fix/boxo-files-remove-seeker-from-file-interface
branch
from
May 15, 2026 00:05
3bb4ede to
1e50692
Compare
lidel
marked this pull request as ready for review
May 15, 2026 00:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates boxo to ipfs/boxo#1128 which removes
io.Seekerfrom thefiles.Fileinterface.The goal is to see what happens. Callers that need seeking now type-assert to
io.Seeker.Turns our we dont have that many?
TODO