Skip to content

fix: Add back DecodeError::new - #1382

Merged
LucioFranco merged 2 commits into
tokio-rs:masterfrom
caspermeijn:decode_error_new
Jan 10, 2026
Merged

LucioFranco merged 2 commits into
tokio-rs:masterfrom
caspermeijn:decode_error_new

Conversation

@caspermeijn

@caspermeijn caspermeijn commented Dec 15, 2025 •

Copy link
Copy Markdown
Member

This function was meant for internal use only. Because of doc(hidden) it was publicly available and it is actually used by users. The prost 0.14.2 release broken some of the crate ecosystem. That release was yanked. To prevent more breakage, this PR adds the function back. This time as a public function that is documented to not be used.

The prost project intents to remove this function in the next breaking release.

This function was meant for internal use only. Because of `doc(hidden)` it was publicly available and it is actually used by users. The prost 0.14.2 release broken some of the crate ecosystem. That release was yanked. To prevent more breakage, this PR adds the function back. This time as a public function that is documented to not be used.

The prost project intents to remove this function in the next breaking release.
@jknovi

jknovi commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

This LGTM. Can you share the commit in which this was removed for more context?

@GlenDC GlenDC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well!

@GlenDC

GlenDC commented Jan 10, 2026

Copy link
Copy Markdown
Member

This LGTM. Can you share the commit in which this was removed for more context?

It was originally removed in this merged PR @jknovi: #1330

Comment thread prost/src/error.rs Resolved
@LucioFranco
LucioFranco enabled auto-merge January 10, 2026 16:45
@LucioFranco
LucioFranco added this pull request to the merge queue Jan 10, 2026
Merged via the queue into tokio-rs:master with commit 5595b61 Jan 10, 2026
17 checks passed
@samuelcolvin

Copy link
Copy Markdown

It seems unfortunate if DecodeError::new becomes private and there's no alternative. Without being able to create DecodeErrors, it's not really possible to implement the Message crate.

Is there a plan to provide a public interface for creawting DecodeErrors?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants