protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.65k stars 15.49k forks source link

[java] no deprecation window for JsonFormat.Printer includingDefaultValueFields() with no arguments #18704

Open lepistone opened 3 weeks ago

lepistone commented 3 weeks ago

We noticed what we think is a breaking change without a deprecation window, starting in the 26 series for Java.

The affected method is JsonFormat.Printer includingDefaultValueFields() with no arguments.

Looking at the commit history, it was deprecated in:

But then immediately after removed in:

I could not find any release where the method is deprecated but not removed.

Since this method has been very often used in our organization, this makes upgrading more difficult.

Would it be possible to bring back the deprecated shim for a few releases so that we can migrate away from it more gracefully? Or can you suggest a migration strategy so that we don't have to rewrite the code and upgrade the library in unison?

Thank you!

googleberg commented 3 weeks ago

Hi @lepistone,

We will add this back in as a deprecated method until the next breaking change (currently planned for 2026.Q1).

lepistone commented 3 weeks ago

Thanks, much appreciated!