Skip to content

Commit edacfce

Browse files
mkruskal-googlecopybara-github
authored andcommitted
Test copybara
PiperOrigin-RevId: 808677109
1 parent 6020dc5 commit edacfce

File tree

12 files changed

+121
-64
lines changed

12 files changed

+121
-64
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
with:
3838
github_token: ${{ secrets.GITHUB_TOKEN }}
3939
publish_dir: ./public
40-
cname: protobuf.dev
40+
cname: protobuf.dev

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# How to Contribute
22

3+
blah
4+
35
We'd love to accept your patches and contributions to this project. There are
46
just a few small guidelines you need to follow.
57

content/includes/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.g3doc-duckie-link-button {
2+
display: none;
3+
}

content/programming-guides/enum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ question:
5151
## Implications of *Closed* Enums
5252

5353
The behavior of *closed* enums has unexpected consequences when parsing a
54-
repeated field. When a `repeated Enum` field is parsed all unknown values will
54+
repeated field. When a `repeated Enum` field is parsed, all unknown values will
5555
be placed in the
5656
[unknown field](/programming-guides/proto3/#unknowns)
5757
set. When it is serialized those unknown values will be written again, *but not

content/programming-guides/serialization-not-canonical.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ description = "Explains how serialization works and why it is not canonical."
55
type = "docs"
66
+++
77

8+
<!--*
9+
# Document freshness: For more information, see go/fresh-source.
10+
freshness: { owner: 'esrauch' reviewed: '2025-01-09' }
11+
*-->
12+
813
Many people want a serialized proto to canonically represent the contents of
914
that proto. Use cases include:
1015

content/reference/go/opaque-faq.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ make the Opaque API the default.
3535

3636
## How Do I Enable the New Opaque API for My Messages? {#enable}
3737

38-
With Protobuf Edition 2023 (current at the time of writing), you can select the
39-
Opaque API by setting the `api_level` editions feature to `API_OPAQUE` in your
40-
`.proto` file. This can be set per file or per message:
38+
Starting with Protobuf Edition 2023, you can select the Opaque API by setting
39+
the `api_level` editions feature to `API_OPAQUE` in your `.proto` file. This can
40+
be set per file or per message:
4141

4242
```proto
4343
edition = "2023";
@@ -50,7 +50,7 @@ option features.(pb.go).api_level = API_OPAQUE;
5050
message LogEntry { … }
5151
```
5252

53-
Protobuf Edition 2024 will default to the Opaque API, meaning you will not need
53+
Protobuf Edition 2024 defaults to the Opaque API, meaning you will not need
5454
extra imports or options anymore:
5555

5656
```proto
@@ -61,8 +61,6 @@ package log;
6161
message LogEntry { … }
6262
```
6363

64-
The release date estimate for Protobuf Edition 2024 is early 2025.
65-
6664
For your convenience, you can also override the default API level with a
6765
`protoc` command-line flag:
6866

content/reference/go/opaque-migration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ To install the migration tool, use:
6666

6767
```
6868
go install google.golang.org/open2opaque@latest
69+
go install golang.org/x/tools/cmd/goimports@latest
6970
```
7071

7172
{{% alert title="Note" color="info" %}}If

content/reference/java/java-generated.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,15 @@ class Any {
674674
// Checks whether this Any message’s payload is the given type.
675675
public <T extends Message> boolean is(class<T> clazz);
676676

677+
// Checks whether this Any message’s payload has the same type as the given
678+
// message.
679+
public boolean isSameTypeAs(Message message);
680+
681+
// Unpacks Any into a message with the same type as the given messsage.
682+
// Throws exception if the type doesn’t match or parsing the payload fails.
683+
public <T extends Message> T unpackSameTypeAs(T message)
684+
throws InvalidProtocolBufferException;
685+
677686
// Unpacks Any into the given message type. Throws exception if
678687
// the type doesn’t match or parsing the payload has failed.
679688
public <T extends Message> T unpack(class<T> clazz)

content/reference/protobuf/google.protobuf.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ Enum type definition
433433
</td>
434434
<td>The source syntax.</td>
435435
</tr>
436+
<tr>
437+
<td><code>edition</code></td>
438+
<td><code>string</code>
439+
</td>
440+
<td>The source edition if <code>syntax</code> is <code>SYNTAX_EDITIONS</code>.</td>
441+
</tr>
436442
</tbody>
437443
</table>
438444

@@ -1231,6 +1237,10 @@ The syntax in which a protocol buffer element is defined.
12311237
<td><code>SYNTAX_PROTO3</code></td>
12321238
<td>Syntax <code>proto3</code>.</td>
12331239
</tr>
1240+
<tr>
1241+
<td><code>SYNTAX_EDITIONS</code></td>
1242+
<td>Syntax uses the <code>edition</code> construct.</td>
1243+
</tr>
12341244
</tbody>
12351245
</table>
12361246

content/reference/ruby/ruby-generated.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ read the language guides for
1313
[editions](/programming-guides/editions) before reading
1414
this document.
1515

16-
The protocol compiler for Ruby emits Ruby source files that use a DSL to define
17-
the message schema. However the DSL is still subject to change. In this guide we
18-
only describe the API of the generated messages, and not the DSL.
19-
2016
## Compiler Invocation {#invocation}
2117

2218
The protocol buffer compiler produces Ruby output when invoked with the

0 commit comments

Comments
 (0)