Skip to content

Comments

pkg/ioutils: deprecate unused types and functions#49244

Merged
AkihiroSuda merged 3 commits intomoby:masterfrom
thaJeztah:ioutils_deprecations
Jan 9, 2025
Merged

pkg/ioutils: deprecate unused types and functions#49244
AkihiroSuda merged 3 commits intomoby:masterfrom
thaJeztah:ioutils_deprecations

Conversation

@thaJeztah
Copy link
Member

pkg/ioutils: deprecate BytesPipe, NewBytesPipe, ErrClosed

These types are only used internally in container/streams and have no
external consumers. Deprecate them in preparation of moving them to
a subpackage of container/streams.

pkg/ioutils: deprecate WriteCounter, NewWriteCounter

it was moved to pkg/ioutils in c30a55f,
and only had a single use at the time in engine/Env.WriteTo. That use
was removed in 531f412, which removed
the engine package.

pkg/ioutils: deprecate NewReaderErrWrapper

It was introduced in bd130e7 as part of
docker#7542, but was never used.

pkg/ioutils: deprecate NopFlusher

Apart from being used internally for NewWriteFlusher, it's only used
in a single location outside of this package. Copy the implementation
where it's used, and mark it deprecated.

- How to verify it

- Description for the changelog

Go SDK: pkg/ioutils: deprecate `BytesPipe`, `NewBytesPipe`, `ErrClosed`. These types are only used internally and will be removed in the next release
Go SDK: pkg/ioutils: deprecate `WriteCounter`, `NewWriteCounter`. This type and utility were not used and will be removed in the next release
Go SDK: pkg/ioutils: deprecate `NewReaderErrWrapper`. This function was not used and will be removed in the next release.
Go SDK: pkg/ioutils: deprecate `NopFlusher`. This type was only used internally and will be removed in the next release.

- A picture of a cute animal (not mandatory but encouraged)

These types are only used internally in container/streams and have no
external consumers. Deprecate them in preparation of moving them to
a subpackage of container/streams.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
it was moved to pkg/ioutils in c30a55f,
and only had a single use at the time in [engine/Env.WriteTo]. That use
was removed in 531f412, which removed
the engine package.

[engine/Env.WriteTo]: https://github.com/moby/moby/blob/c30a55f14dbbe3971ba0ac716ba69a60868f4490/engine/env.go#L260-L264

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Apart from being used internally for NewWriteFlusher, it's only used
in a single location outside of this package. Copy the implementation
where it's used, and mark it deprecated.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@AkihiroSuda AkihiroSuda merged commit 00d1b92 into moby:master Jan 9, 2025
169 checks passed
@thaJeztah thaJeztah deleted the ioutils_deprecations branch January 9, 2025 20:54
@thaJeztah thaJeztah mentioned this pull request Jan 10, 2025
79 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants