This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Commit fef7983
authored
test: unknown fields are preserved (#160)
* test: unknown fields are preserved
Consider the following:
```proto
message Old {
string name = 1;
}
message New {
string name = 1;
string path = 2;
}
```
We can think of `New` as being a minor version release update of `Old`.
If a client using the older version receives a message over the wire
from a server using the newer version, it is desirable that any new,
unknown fields are preserved. These can store context the server
needs, which is important in get/modify/set loops.1 parent b12971a commit fef7983
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
288 | 310 | | |
289 | 311 | | |
290 | 312 | | |
| |||
0 commit comments