Commit 1f38ea6
prost-build:
* prost-build: CodeGenerator::boxed method
A helper method to capture the logic of deciding whether a field
needs to be boxed. This follows the pattern with other methods like
`optional`, and will allow reusing the logic in the upcoming builder
codegen.
* prost-build: more reuse with CodeGenerator::boxed
The bit in CodeGenerator::append_oneof was pretty much the same,
except the configuration is looked up for the oneof name.
Rearrange the logic so that intermediate values are bound when needed.
If a repeated fields is configured to be boxed, a deprecation warning
will be emitted by the build script.
* prost-build: document CodeGenerator::boxed
* prost-build: only emit warning on repeated fields
Co-authored-by: Casper Meijn <[email protected]>
---------
Co-authored-by: Casper Meijn <[email protected]>CodeGenerator::boxed method (#1019)1 parent 2308ba4 commit 1f38ea6
1 file changed
+49
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | 408 | | |
419 | 409 | | |
420 | 410 | | |
| |||
636 | 626 | | |
637 | 627 | | |
638 | 628 | | |
639 | | - | |
640 | | - | |
641 | 629 | | |
642 | 630 | | |
643 | 631 | | |
| |||
654 | 642 | | |
655 | 643 | | |
656 | 644 | | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
666 | 650 | | |
667 | 651 | | |
668 | 652 | | |
| |||
1068 | 1052 | | |
1069 | 1053 | | |
1070 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1071 | 1098 | | |
1072 | 1099 | | |
1073 | 1100 | | |
| |||
0 commit comments