Skip to content

Commit 7769370

Browse files
Protocol Buffer TeamLogofile
authored andcommitted
This change includes the following:
* Reverts changes made in the GitHub Actions workflow * Adds a paragraph to the News topic about upcoming plans to announce changes to the protobuf mailing list * Adds information to the Proto2 topic about the system checking UTF-8 validity in String fields * Adds information to the Proto3 topic about a symbol `FooEntry` not being compatible with a map `foo` in the same scope * Clarifies and corrects information about what is generated in Dart for enums * Adds extensive new information to the Cross-Version Runtime Guarantee topic * Adds information to the Version Support topic about an extension to support for Java 3.25.x PiperOrigin-RevId: 629749655 Change-Id: I1b7cf99abb2aa454b9ccedb98fb45268b127ceb1
1 parent 0681431 commit 7769370

File tree

7 files changed

+99
-28
lines changed

7 files changed

+99
-28
lines changed

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: github pages
2-
32
on:
43
push:
54
branches:
@@ -13,17 +12,13 @@ jobs:
1312
deploy:
1413
runs-on: ubuntu-22.04
1514
steps:
16-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v3
1716
with:
1817
submodules: true # Fetch Hugo themes (true OR recursive)
1918
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2019

21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: 20
24-
2520
- name: Setup Hugo
26-
uses: peaceiris/actions-hugo@v3
21+
uses: peaceiris/actions-hugo@v2
2722
with:
2823
hugo-version: 'latest'
2924
extended: true
@@ -35,9 +30,9 @@ jobs:
3530
run: hugo --minify
3631

3732
- name: Deploy
38-
uses: peaceiris/actions-gh-pages@v4
33+
uses: peaceiris/actions-gh-pages@v3
3934
if: github.ref == 'refs/heads/main'
4035
with:
4136
github_token: ${{ secrets.GITHUB_TOKEN }}
4237
publish_dir: ./public
43-
cname: protobuf.dev
38+
cname: protobuf.dev

content/news/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Buffers, and plans for upcoming changes. The information is available both
1111
chronologically and per-release. Note that not everything is included in the
1212
per-release topics, as some content is not tied to a version.
1313

14+
New news topics will also be published to the
15+
[protobuf@](https://groups.google.com/g/protobuf) mailing list under the subject
16+
\[Announcement\].
17+
1418
## Chronological {#chronological}
1519

1620
The following news topics provide information in the reverse order in which it

content/programming-guides/proto2.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ automatically generated class:
462462
</tr>
463463
<tr>
464464
<td>string</td>
465-
<td>A string must always contain UTF-8 encoded or 7-bit ASCII text, and
465+
<td>A string must always contain UTF-8 encoded<sup>[5]</sup> or 7-bit ASCII text, and
466466
cannot be longer than 2<sup>32</sup>.</td>
467467
<td>string</td>
468468
<td>String</td>
@@ -502,6 +502,10 @@ checking to make sure it is valid.
502502
when decoded, but can be an int if an int is given when setting the field. In
503503
all cases, the value must fit in the type represented when set. See [2].
504504

505+
<sup>[5]</sup> Proto2 typically doesn't ever check the UTF-8 validity of string
506+
fields. Behavior varies between languages though, and invalid UTF-8 data should
507+
not be stored in string fields.
508+
505509
You can find out more about how these types are encoded when you serialize your
506510
message in
507511
[Protocol Buffer Encoding](/programming-guides/encoding).

content/programming-guides/proto3.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,8 @@ map<string, Project> projects = 3;
10761076
field is serialized is language-dependent. In C++, Java, Kotlin, and Python
10771077
the default value for the type is serialized, while in other languages
10781078
nothing is serialized.
1079+
* No symbol `FooEntry` can exist in the same scope as a map `foo`, because
1080+
`FooEntry` is already used by the implementation of the map.
10791081

10801082
The generated map API is currently available for all supported languages. You
10811083
can find out more about the map API for your chosen language in the relevant

content/reference/dart/dart-generated.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,19 @@ enum Color {
347347

348348
The protocol buffer compiler will generate a class called `Color`, which extends
349349
the `ProtobufEnum` class. The class will include a `static const Color` for each
350-
of the three values defined as well as a `static const List<Color>` containing
351-
all the three non-unspecified values. It will also include the following method:
350+
of the four values, as well as a `static const List<Color>` that contains the
351+
values.
352+
353+
```dart
354+
static const List<Color> values = <Color> [
355+
COLOR_UNSPECIFIED,
356+
COLOR_RED,
357+
COLOR_GREEN,
358+
COLOR_BLUE,
359+
];
360+
```
361+
362+
It will also include the following method:
352363

353364
- `static Color? valueOf(int value)`: Returns the `Color` corresponding to the
354365
given numeric value.

content/support/cross-version-runtime-guarantee.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,49 @@ produced from `protoc`) and the runtime libraries that must be included when
1212
using the generated code. When these come from different releases of protobuf,
1313
we are in a "cross version runtime" situation.
1414

15-
Historically, protobuf has not documented its cross-version runtime
16-
compatibility guarantees and has been inconsistent about enforcing what
17-
guarantees it provides. Moving forward, we intend to offer the following
18-
guarantees across all languages except C++. These are the default guarantees;
19-
however, owners of protobuf code generators and runtimes may explicitly override
20-
them with more specific guarantees for that language.
15+
We intend to offer the following guarantees across all languages except
16+
[C++](#cpp). These are the default guarantees; however, owners of protobuf code
17+
generators and runtimes may explicitly override them with more specific
18+
guarantees for that language.
19+
20+
Protobuf cross-version usages outside the guarantees are **error-prone and not
21+
supported**. Version skews can lead to *flakes and undefined behaviors* that are
22+
hard to diagnose, even if it can often *seem* to work as long as nothing has
23+
changed in a source-incompatible way. For Protobuf, the proliferation of tools
24+
and services that rely on using unsupported Protobuf language bindings prevents
25+
the protobuf team from updating the protobuf implementation in response to bug
26+
reports or security vulnerabilities.
27+
28+
## New Gencode + Old Runtime = Never Allowed {#backwards}
29+
30+
We may add new runtime APIs in any kind of release (Major, Minor, or Patch).
31+
Gencode in that release is allowed to use those new APIs. The consequence is
32+
that gencode should never be paired with a runtime that predates the `protoc`
33+
and plugin that was used to generate those bindings.
34+
35+
We will add “poison pills” where possible to prevent attempts to pair newer
36+
gencode with an older runtime.
2137

2238
## Major Versions {#major}
2339

24-
Protobuf will not support mixing generated code and runtimes across major
25-
version boundaries. We will add “poison pills” where possible to detect these
26-
mismatches.
40+
Starting with the 2025Q1 release, the protobuf project will adopt a rolling
41+
compatibility window for major versions. Code generated for a major version V
42+
(full version: V.x.y) will be supported by protobuf runtimes of version V and
43+
V+1.
44+
45+
Protobuf will not support using gencode from version V with runtime &gt;= V+2
46+
and will be using a "poison pill" mechanism to fail with a clear error message
47+
when a software assembly attempts to use such a configuration.
2748

2849
## Minor Versions {#minor}
2950

3051
Within a single major runtime version, generated code from an older version of
3152
`protoc` will run on a newer runtime.
3253

33-
Within a single major runtime version, generated code from a newer version of
34-
`protoc` is not guaranteed to run on an older runtime. We will add “poison
35-
pills” where possible to detect these mismatches.
54+
## Cross-domain {#cross-domain}
55+
56+
Mixing Protobuf gencode and runtime across the boundary between open source and
57+
Google-internal will not be supported.
3658

3759
## Security Exception {#exception}
3860

content/support/version-support.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ This table provides specific dates for support duration.
496496
<tr>
497497
<td class="gray">3.25.x</td>
498498
<td>1 Nov 2023</td>
499-
<td>31 Mar 2025</td>
499+
<td>31 Mar 2026*</td>
500500
</tr>
501501
<tr>
502502
<td class="gray">4.26.x</td>
@@ -505,6 +505,12 @@ This table provides specific dates for support duration.
505505
</tr>
506506
</table>
507507

508+
**NOTE:** the support window for the Java 3.25.x release will be 24 months
509+
rather than the typical 12 months for the final release in a major version line.
510+
Future major version updates (5.x+) will adopt an improved
511+
["rolling compatibility window"](/support/cross-version-runtime-guarantee/#major)
512+
that should allow a return to 12-month support windows.
513+
508514
This table graphically shows support durations.
509515

510516
Java will target making major version bumps annually in Q1 of each year.
@@ -567,13 +573,14 @@ Java will target making major version bumps annually in Q1 of each year.
567573
<td class="gray">3.25.x</td>
568574
<td title=23Q2></td>
569575
<td title=23Q3></td>
576+
<!--3.25.x is special and will be publicly supported until end of 26Q1-->
570577
<td title=23Q4 class="blue">IR</td>
571578
<td title=24Q1 class="green">PS</td>
572579
<td title=24Q2 class="green">PS</td>
573580
<td title=24Q3 class="green">PS</td>
574581
<td title=24Q4 class="green">PS</td>
575582
<td title=25Q1 class="green">PS</td>
576-
<td title=25Q2 class="red">SE</td>
583+
<td title=25Q2 class="green">PS</td>
577584
</tr>
578585
<tr>
579586
<td class="gray">26.x</td>
@@ -597,7 +604,7 @@ Java will target making major version bumps annually in Q1 of each year.
597604
</tr>
598605
<tr>
599606
<td class="gray">27.x</td>
600-
<td class="gray"></td>
607+
<td class="gray">4.27.x</td>
601608
<td title=23Q2></td>
602609
<td title=23Q3></td>
603610
<td title=23Q4></td>
@@ -610,7 +617,7 @@ Java will target making major version bumps annually in Q1 of each year.
610617
</tr>
611618
<tr>
612619
<td class="gray">28.x</td>
613-
<td class="gray"></td>
620+
<td class="gray">4.28.x</td>
614621
<td title=23Q2></td>
615622
<td title=23Q3></td>
616623
<td title=23Q4></td>
@@ -621,6 +628,32 @@ Java will target making major version bumps annually in Q1 of each year.
621628
<td title=25Q1></td>
622629
<td title=25Q2></td>
623630
</tr>
631+
<tr>
632+
<td class="gray">29.x</td>
633+
<td class="gray">4.29.x</td>
634+
<td title=23Q2></td>
635+
<td title=23Q3></td>
636+
<td title=23Q4></td>
637+
<td title=24Q1></td>
638+
<td title=24Q2></td>
639+
<td title=24Q3></td>
640+
<td title=24Q4 class="blue">IR</td>
641+
<td title=25Q1></td>
642+
<td title=25Q2></td>
643+
</tr>
644+
<tr>
645+
<td class="gray">30.x</td>
646+
<td class="gray">5.30.x</td>
647+
<td title=23Q2></td>
648+
<td title=23Q3></td>
649+
<td title=23Q4></td>
650+
<td title=24Q1></td>
651+
<td title=24Q2></td>
652+
<td title=24Q3></td>
653+
<td title=24Q4></td>
654+
<td title=25Q1 class="blue">IR</td>
655+
<td title=25Q2></td>
656+
</tr>
624657
</table>
625658

626659
<table>

0 commit comments

Comments
 (0)