Commit eba53e8
Avoid collision name problems between a message named
We unfortuantely have no holistic startegy to avoid broken gencode from cross-type name collisions. We hold a high bar for special case mangling cross-type collisions, but this specific naming pattern combination is recommended by AIP 157.
Note that we will still break if the Xyz message and the XyzView enum are defined in separate .proto files but built in the same crate. It is very difficult for us to avoid that specific collision, so we are punting on it for now and only handling the case where the message and enum are defined in the same file. Especially when using blazel, we recommend one proto_library() per proto file, which would avoid that topic from being a concern.
PiperOrigin-RevId: 853935768Xyz and a direct sibling enum named XyzView
1 parent 0bc4192 commit eba53e8
File tree
2 files changed
+52
-2
lines changed- rust/test
- src/google/protobuf/compiler/rust
2 files changed
+52
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
313 | 353 | | |
314 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
315 | 359 | | |
316 | 360 | | |
317 | 361 | | |
| |||
323 | 367 | | |
324 | 368 | | |
325 | 369 | | |
326 | | - | |
| 370 | + | |
| 371 | + | |
327 | 372 | | |
328 | 373 | | |
329 | 374 | | |
| |||
0 commit comments