From 29c522d5d8a31721b32fa0932f2f4abba445ec77 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 7 Oct 2024 15:00:16 +0300 Subject: [PATCH] [#122] protogen: Always marshal empty fields This is how it was done previously: https://git.frostfs.info/TrueCloudLab/frostfs-api-go/src/commit/a0a9b765f3a56423b1c6f1fef1d1b413da0e03ef/rpc/message/encoding.go#L31 The tricky part is `[]byte` which is marshaled as `null` by easyjson helper, but as `""` by protojson. Signed-off-by: Evgenii Stratonikov --- accounting/grpc/service_frostfs.pb.go | Bin 19204 -> 18906 bytes accounting/grpc/types_frostfs.pb.go | Bin 4394 -> 4324 bytes acl/grpc/types_frostfs.pb.go | Bin 48948 -> 48047 bytes ape/grpc/types_frostfs.pb.go | Bin 8643 -> 8592 bytes apemanager/grpc/service_frostfs.pb.go | Bin 57972 -> 57148 bytes container/grpc/service_frostfs.pb.go | Bin 78129 -> 76787 bytes container/grpc/types_frostfs.pb.go | Bin 12461 -> 12208 bytes lock/grpc/types_frostfs.pb.go | Bin 3900 -> 3854 bytes netmap/grpc/service_frostfs.pb.go | Bin 55828 -> 55002 bytes netmap/grpc/types_frostfs.pb.go | Bin 58646 -> 57422 bytes object/grpc/service_frostfs.pb.go | Bin 227551 -> 223720 bytes object/grpc/types_frostfs.pb.go | Bin 66649 -> 65148 bytes refs/grpc/types_frostfs.pb.go | Bin 30631 -> 30568 bytes session/grpc/service_frostfs.pb.go | Bin 20459 -> 20196 bytes session/grpc/types_frostfs.pb.go | Bin 72194 -> 70734 bytes status/grpc/types_frostfs.pb.go | Bin 14270 -> 14144 bytes tombstone/grpc/types_frostfs.pb.go | Bin 5837 -> 5766 bytes util/proto/marshal_test.go | 44 +++++++++++++++++++--- util/proto/test/custom/test_frostfs.pb.go | Bin 35560 -> 34803 bytes util/protogen/internalgengo/json.go | 24 +++++++----- 20 files changed, 53 insertions(+), 15 deletions(-) diff --git a/accounting/grpc/service_frostfs.pb.go b/accounting/grpc/service_frostfs.pb.go index 4f113030852c97043968c08d9c77a5cd59ce5589..9c8c946a8e3ecb7e3c3e1e5814965ea79b93a266 100644 GIT binary patch delta 581 zcmZpf#&~No;|3#cPQ|p$qT&*TYOcxm6~yFf6;gAGQ-M5APELq~twLHNPzWec%Qe|g zL3;8EZobJyZW5C(a4SqUG)SGiK%8~5JSY3+RGx{#q?)D%HtDg8tZ*$CC&<#wGzF3! z)b1(>HfEEnGP%aQQ`7?+(e0)R^^?HlH3k(xzX@!PQ5NPQ)n78)i8+aR$*D0)R!Urx d3*4k8^BO2@HZ+hDA=RY88A92c<=vk$0|3t~uT}s6 delta 960 zcmcaLnXzRW;|3${=n6gm^1Rd{&lCkkTZO#L9EEBwPEO9uGzG=9%%b8F2$wUzv_vl` zvD~S$BvnIQM_m)7rdA;}r#Ka=0HWAdAuSOo2A1XGoV-y%dU6*x-(-7z$;s=v6`43| zH=pBX5s9eKbIMPtq>+VM3fy1|eH7%lIBUTO=%vYZVlr-2^Og?C26oO0J>S%l#K~(F zWsz+) diff --git a/accounting/grpc/types_frostfs.pb.go b/accounting/grpc/types_frostfs.pb.go index 8585583f61f16bd18ec684bc61d8e6e14f98a525..b7e6b40363a032fff3b5c8f4e062795577e416d4 100644 GIT binary patch delta 198 zcmZ3b^h9w3H@B@~T4qski9$6OCnslqX^CD?V!2agNvejrj=CmLtX3g4r#KZN4N+;U zkd_D(0?BbrPU2RdypTs?@?vh`$=kV|fV7Z%Ef*)qw9GUG%FHh1(FU0<4sum!W?qT0 Xkw%4HKv8OPW^rbIp62GOJfSQA6}>sq delta 240 zcmaE&xJqdQH@AF+URYvIX{v&vt%89P*+md1j^0ec9F#*4$=oi xAWJT?O7f9suPKi<$X*$+`JtJ4CB{Y?6?y?hsmYnenfZA@>p5#T_w$6Z005mFKW6{{ diff --git a/acl/grpc/types_frostfs.pb.go b/acl/grpc/types_frostfs.pb.go index 1ba6c5330b198b17c3e46b2a9ff21f61498125aa..e5a6f32c25a89a77a238be5194e7f155542e87de 100644 GIT binary patch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B_ne00WA|!`EJ;GkO|O$-p><2mlS2@rE8Rxq3Z`pdghfF8)-nKxPT^b zf-KHVQ=rHhoSez|c|cDTOzz|p;>=6TO^s2qQsSC?fL}@o$wd`(4oZH|)5WCj4IBwdF9 delta 301 zcmbQ>eAsz|79UTAUPxs@s)C}ef`P*1AlX!w5+HZ-E?Gt4G6gGJh0MGXVx(q5~u|dKnz46 z`OGwhoYXv^nSMZnG?8ou84R*n2&6x_q$o2l9j0osu3Y-$1#BFfMFiY<6TsRl^nw!0 zq1qwV0u5G7%PcA`fjR^14xl2Z%92zKbscrETTorf2~lsWkd_E^KG^Xva*|X<&v2Jegad6 diff --git a/apemanager/grpc/service_frostfs.pb.go b/apemanager/grpc/service_frostfs.pb.go index 2a30850af2f77c702d42ad2da39801a121f46f3a..7f3ed10eca70e1d6a8f4355bca8cd9943eab9c6a 100644 GIT binary patch delta 2063 zcmexzgn7?C<_$A=ITh0~i;7DWs<|cyZWEKMRY=V#P6hHfIXNK`whC#9Kp~(&E!X6W z?$VQa`FJNk;**%XDN%HO2El$%s9Nl%tD<^vff3JmiKJ!eoLdZs8S+A8E_<|tH8 zu8C5TK#Icr(h|MklA_GKbPXk?$%6NiC);@mOxAZ{pWIi=2?=Me$@V(DoBL`V87IdH zvTa^(dTKa?^X5mMCj6uaE_Kp2g>kg`PgIf!scs*fX+380pD3Zpchk5xI}`=U4HrMX zX_uQE>6JfueG%_ufnJWu0bZP&W$%YFZVsRNpNmvaq7chs$tB0sM1WNmCyM%5bAuS*PPT#4lOkE!Vw9|ufaZL>DaFBAq34{D zn3*^E;9=>>hmF!EH?WINE~w6*yv~>l#NK?)*p6|tyr7@ZWEEQ>@~xfhaFZMCm!z9= z$bR9GlA*xR3+{qoLld{CARD^DR*nKgC)^SS8!EU}ZSsDjtjP=H*(d82a!y{q6%r~y z{${ylKd|<2WBIP$9G!hjVplb>@@CzS&Wri97<7kDNotY@A4VFvr= zg!%VJZc2m%1pDMOt2j5W-)hLKnvK^8BDGJ`-UVsE%iaRO6cutBHc@ZcbFKvFele7$pN^ zQE2joU2K!{^q?VuY?F0H1K}joZ~f%pO7=r{7YIWqbG*R0{Og~`D2ts2-!OD zfdh0Z|KxY+oSXTIyJUxib2%oT@8Q^-JDJQhJmE3xChzC3n0)>WjLo@Opw5DE zvVhs$&74bS2@HXN0Q+MV`()N)s6SS*Z~n2pMv#!xsZrvQmOCb&hLk}EPD9I}36Hrq z2b`%M0=Z-JgvT8Oi%L)??)$(8Dk?cE^!&^7Qj0uOCOd8w2Njx0lNG+PPQLew9hBfU zANY82@E4dMCqvTJfsfqVpRqHZBp3w1(v!n8r8q{(N{MT-AitDQerbtbP-3}LWl5@r zdbGMG7w7Zk>0an1AC>mqcHMcX0 WF*XnWl#((1wk{+0_5@wVi_8EO-@gn1 delta 2923 zcmex-on_-AmJK_2Ctunl&c~UVrl6RXSyWu2P|d|T`5>~h@3)m9-r?>#5QneNS3x%8uB{x=W*k(}gP0LtpoZ`~>-6JHj8&8W zD)4N+xh0NqbD8=zuF1x_l0+K|i5t$zYmGP|#w*QJ1scEkgV817VHs+fll$$sCx4ib zzj?N&C_lwvg&ds}q~%Rfy&}UexFA1=IGo`@gnZN_q$^FxKP|CE)t}$((B5m^7DO{UV7fu+S#TqCKxFE$EC=kxC6xiHQ z7|OWWe4CuWfLA-n**$G9@ul}dKAFjECxjqHto{jT2@diq>tu(MV$dk(o}9mneY=4W zV*umkxu<3c4ZnN?th2$M-aO%cGmmnGo_~2>YLRCOITbUg=E{D<2MN*%ZxmrU$lwR} zWWHzYpqw*(ogicByvwf}xV;D04@V`_| diff --git a/container/grpc/types_frostfs.pb.go b/container/grpc/types_frostfs.pb.go index e5da35ff24fbfbb2531b1a307b5cb5cf7482c61c..4ca23fa4cdaef715406511d0e09dba21145c6189 100644 GIT binary patch delta 699 zcmZ3RxFLRn1P`ZTT4qski9$8krsLRmjWCQK+6QrmkRw6t?-L zC3?XnMVWc&8cIr<;J^ijFPVWUJ$bu2KiD4+)Fmhg4*tXvpp%kHOHzyBo)HAOG$^s$ zsj?(hLp@qulWX#R4P{V_XM#LuF!_S23?tWM9!)Jxp!+#dRL25UQ{t;znqpvIacOBx R?%++GET_%Ad6^bF8vqSx#D4$) delta 895 zcmdlGzcz7$1kdDBHW5C~%rphXw9KO75`}6m&dG{AVoIE~3aL58sUSWOK;&!{(h`AU zAdy<2vNt@^lM8sbCJXUOPM*jkVgwQdB9IQCc{!29~Q+%p8h*Bt3bqDjzuP4yh`F0}c{)lTV9Dk?jp>?!5fGO9RX0l^)4&{*|Jy}+rALNAqaKwaW=9L&50V4)xgC;0$kS&L#3C9v( z3?`M9q!v>lVMtHjr!EL`g9z9SL5bx~l_jYf>e1>T+b7$KD++*NISN66&I8e-sB7SPmW;;fx)$D6)+o~95R0P5=Kga7~l diff --git a/lock/grpc/types_frostfs.pb.go b/lock/grpc/types_frostfs.pb.go index 33f22c58e9336bba7806dcb6932fbc20f462a0fc..004a01f76739bae9531deea65224b342f76520bb 100644 GIT binary patch delta 150 zcmdlZ*C)53o{Lj4EwiY&M4_5%aw4~wT&+TCPH`%b$H~bFk+4-rO9To51!}n_-{sQO z$}cU^3rZ{xE-A{)OV=nUN=?hG&;&|D#hofkQZ>}0)qz5juQSVWab~6|WGX1yDi};& Z$R)$bHMxdcU8ELWeXP3X=DpnY%m9mIEY|=4 delta 234 zcmeB^+atH3o+~aVHBX~L&o?zUDYd9rQ$f*I!9by!i<6TxGfhD;EwiY&1j6OaFD=mv zN-TG(EJ@W+*HPC5si{>+%_&ZWDu5`qRY*$&ih*UhI4AGn($s-z4K69l%uClOC`wJs ytN`mrF*6!u=43u@1uc->nMh9IgqeV1IcF_Uc?h?<6o`SQBo^$x+Rgpk^~?Z_Ha*h- diff --git a/netmap/grpc/service_frostfs.pb.go b/netmap/grpc/service_frostfs.pb.go index 4d5303139dbbcaa93870323ef9f4aacf859c1d2e..9ebbf985636f0819f90afa85aec0d2b53f3bf98f 100644 GIT binary patch delta 1633 zcmbQTh56Q6<_*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P zW-)y}-rRUXmFG%vJ3M>IrspBJ_q_)eFVPxeP#SjG_uY9{7dimtL_E1nD+2i$*z0bR zLrn^gV;S^nWl)HW$7cD&L~cILiKaw%bLJ2j@ZMAo zMoJM;9KB(bAbD}paY39L5zi67jd-! diff --git a/object/grpc/service_frostfs.pb.go b/object/grpc/service_frostfs.pb.go index f934f3bd650e573621354a194d789fdd02dbc2b7..9ee5a3daeb4e63982e93f5f36e52224ac772978a 100644 GIT binary patch delta 7745 zcmdT}du&uy8qYbmkGYR|PfP7inQ5nBDPb&NsWr&5XncfLkb+7mr4Pq;q|A)%v`lHr zBU#rqX0>{VU!t|ts3D|2Dx+RSr1e3Jn1IH&f;4us#kdP4?8f+D>pADP(-$~%aW}Mo zOmgSmoO{mqeZTMfe&6q&JZn7lv9YIJ5wq|1H#CObtrE%ZNEh4OzWPQV{Re+?Vmoe= z;5Hfkf#eUG$YM_hSu^Oiw@G5FB#QpK-H9xPf-EetwdP<`*t;Satj~*h*Hmqt2bE@_ zf-EmgCLvjYlk<^C&I|_O!^1d<42ec{cqcxLqHkF8t?`d&6z1~d4Sb%Z<9LrOMo!Z4 zi-j-!_+^idrDsiomoM9MehyTdh4K+YlA|x@zL~&*sZXKz6PyA=8wHWQ2<#O?wvGer zYNluZ={_?*gy%0gI+n74!paTE$oFm7fLx;%%pza@HNqnh?JHi8LG~#dNu)!8`~h?Y z+0)@7&y;08dTVmhwKV+XDa8laAyIaZjG7o&R16#zh zaDzWko0pSAI@fw&xEhJDv;-^c-SA!swvzXYGU4AP*u!2<%r~S!W(4uaWYszoe|oMI zyGh8C0=+U?PaSQ6)7^MG=_^*)g&Z9=Ekn`%J51>_0w_Jcbh7lnBS7yfP9=vzvU=t) zUXP-C8)RF28>Sa_bOMh&e!rdL?)m{_2hTxdCI7tN#)^rbfv13=94C^%^%?fC;#1X) z9SohDNFPy1{m!>x2Qf@h}WS< zk0(cSU+a|OTXA8aY2mOOGmxHxsW8-yBhfAIev<%hr-4%}$L!GYBW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h}d?u_~M!5$lZwY-br*M%gj^elmvErYOv-7ZTVOiP2Q%8hRv#^6aT)FSb$F?F)NDy(wGC zyOwy3=>urIM$#M#){+3V#ujE#aiQ~~ycY-+Oee59mMGZ6MV*4x*!QhDPOR9DGMCH0Tg zq>4D7_4*HmyOIh~O@m6GEF^mB`=>7AI@4miz_MRyMfiuNrI|2J17Or)!RM-w+kc2x zl^r?ZfmsrF!sXsEyC7=BMq+yuA;(KIPMauO*d7V3HDvm_GMtMw>5?p+FuEFR6m2=K z$z3TKOz&?da8%P>?RY^8jWt-ml7vHVa~5HJWf^Dg%h&|LZI}z+#KEY+whhbR+KC0Y zkh14i!HF-@roi;)uu6Hp4)08t;P<`Oiapk)6Sa6jZwZiTW_g-|yK0`gy}VHP%?zeG z@M4_#T?i-POi60>3CnxjzEtq~S}&G4cwO(sh54z{ZxL%|gei-153DJy$)=U*;Mf4R z!>$o*{tu+7iIXNVo$G?nzfRjcgD+zJJQ)Py1(k97I6b!Z4w~9?efYK9G)adJx~xIT z`VKy6)JL2vx9h59NQGzIyO8j1b1V~XubjsYOkp>10r!JzoW^Y~ zNr8jGo2Tg$tqb^bc?>J6$ma+jV-(jaRT1D67n$@WNx((bjCL?t0ZBRV?T(Lkb>(yGY7LLfk-QnUpU~wUtRF#VHeM z-`T~k5Q$5iQ1r89wDZX%wp#qVkgK9WkcdXSrO~iXvNA|}8!0oNkv60+)e?TFDD%;* zr}-9y-RtNtHl#YY1u3qb(#>Udo7f>6AlOb%nl?WoK)0m}-tlKittaJgP15DG g^`4k(`9M>e?@!IV%7nK4l9s{DKBUYYlKz7J1y*v(vj6}9 diff --git a/object/grpc/types_frostfs.pb.go b/object/grpc/types_frostfs.pb.go index 0ee939a39eaa4149240b94e7eb381ac414e56d89..e4a916fd1789ec371552e5fa40c0fd87ef518a4b 100644 GIT binary patch delta 3521 zcmd5;OH30{6io$6XJ~<1OOaALQz#UPRWTZ(@e`skM2UQ)F2qlTK?iF~NN|+a_aXD?yefOSw?>Y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nR%&2o+%27whDQfISSQWoSdAQX$p#InMK7VAns%V zVKHvbT7}e{;#4qyqLVNSXDv{|u}FGyys*&ZNkNj6JA_q@K!QL7G6HBqg`R&>R%&ty z`DXKr@Po}Z6;YZjYnCusj+=9`ttjW@+1mM&tA#i>+lqbxIzmm1j}!;5Hst{udRSg| zvbe-7KzSLy>`-<;~V}Pj0mlB*lB& zxrtf%MKMZNO2GJ;7$oJ)nO|C>7n+$@Vr-;Qq2~*d)da>5T1@$7=H(ZGl7IoJ34l8n zq!nSIFq(xR*~wC7$&>ADg+LLv`MPry-{eGZ5mJ1`nVnjRuwwFId0_$X)Jhb8OrGd1 zNrI6wlVgG*i3@1hLhwML1WCvrNItRsj|T5R)~zCM!lL zOzsO2Gz14&a7j^SUb;qE8OT#enGMJRMW81*{-BbRrOlEi$NPwEwhR5kI|zdkn62U_ z_s0lr_DVg*EmxrzQdvM&NJ?{+0Cge)QWP~HLB;|@Yx2B8-DHx(5Iqazq~-y$M{sGb aCOL7g3N2BDnSmyNQ~Ro7;my{?x-0;rAA)iK diff --git a/session/grpc/service_frostfs.pb.go b/session/grpc/service_frostfs.pb.go index c71325a414d0c87c7ab98f0aee764246e38c2012..6d3ea9fe0e64de1700672326eac9629d158f9abe 100644 GIT binary patch delta 757 zcmaDopYh3D#tk=lI2F?}i;7DWs<|eAFc#yiRY=V#P6hDZ7%kxr;JW~`DZ58q|a}=t%I5{~p(-aibGK-2!K-|d(J;b;< zYZX#+ic`USMqXhS&RU>EfUz`hK16$rl9dujsi)NBFkVG2kTej1bkAjz;v>Pp$v1fg zCm-^ZoXp54GFgPr6GSuCP8Lwjp6t)VzWF|%wa8=_dm)mH6!7E*8)@VzXM%7U$Waw~ zzNsaN9;t~bsYPUlz+@2>h=XlZRFM6B!CsCeM<#d)gB|%sMU9EGcC&ygGoNBkYMw@g zo@a_C$ZZBB#*GTtxcSCX9PqfP(Um93O;#oluhp3-0b?L-@&;3}&6cM1!XqIDz#cwe Lz_wY+`xG+(-gn+B diff --git a/session/grpc/types_frostfs.pb.go b/session/grpc/types_frostfs.pb.go index e18c1ab15a523aeaae884ca11a58ccba2f047288..e9f3b424f06ee9769ba81ac145f695d6ebcdda41 100644 GIT binary patch delta 3155 zcmeHJU1(cX9OtfE+k2BXS-zS!X?L5gZQ@6mA9Olt*9JkVZk5%nAe}X7Zpy_pvAH)N zb!Lp=i*};&dng3vwg+LL53_f)YjI4U#33>e(Sn&11O<_8exPAYJohBMi%e{e=#xHO zZchIHbN;`tbB~_g{PF3{XRbT=?zo&*RPm62*_?|nh*Cn4^tW!szNtVSE)Qg<6%9*n z!0EFW1pbh~^Kx9=urNT27SGx7dP}FEm&juGfVdN14SG2N@45OMq#K{gsKNb_Txd>} z{Cx-e0vgx$h^3xmt@N7o9qd_g_kbuT)%))C=Yt2NbTlBK<<0<(@7WsCn~$k!IXUgm zW&>n5V?e&L^9Zf0ED1crbRLr$Nl#1agm1S`0Jqcu-oFhEZO`Fw$b^X-DZFiSXoo|S zoc7WkgLUEjR|C!N8TdDc!Q_xd2Q#1p7D}ZO1j=za5u1vnV+1x9T+lmgqs;Fg-a+t~ zz%#pi6pxvQ+O;F0dFw{po?7zag)yG?(86|TW5dwGHWul5nv>D^EoLfR`uTm)_+8>X zJBdEt2|Jkj;nlEEbD)0Q44d>r(E&$~njwyN(IGD!Gi&1b10fJZNY2t3m2XVD5Rz=o|$rpL;iDTDH zb%?9^*%~l=Yho}TBrr2tTF6Ec8Oh+r{)cu4^tAxEwx>07F8=`!X|8DQzf)5TxgKKR$Su zJS%aj?LGhP|0=0`1N|c^`TLxi6g8q|6oanjJo#ACf6)_*rq0ceI?+{3q2*HtzJHU~ zP83NNetG2$R~-?A@-GfuO6w^|l8i}F`0Q6&5A{1M%4HWzu@~pcPO9T?%6_)O8Us)W z_MUITrJo#d7V{|l;8}ja#R(1Cwckp%{|p8TrADr&s)Oc**PL9ZcJ&6=fYGlT7dkAQ KZQ-eQ?)2|*UFSdm delta 2390 zcmeHIO>Em_7?!uDtsAdRnkL?bh1sh2mYY1f(36!lQId(mhwtNMDZ|4j8i9n@1-1DADBf@zJ6=bh zXX{v2O7j^a$8_O%@+mT`sqHkVgN8iKsKDgIo@`DN`o%(gOe3-AqtSLV2+nM2bz!Vz zU8k8KZ1{lq-SGZmz)#b&Y(?nf7&;EGL>0Kw$ijRx3ta3)`fkiO@2Tf>;RI2Vzt<``ym_gf_i5R-j28*#GDUliX@N3@_E_}JI<4gN_g6XRWc!KyY7ya4$ZF>)9S*2 zsEiP;0-R&fEeMVpZG|KGlV|ym!NqvrU$->ea~Ex??_X%?VJVXu7L}Am)k_B(aPD^x z`j97!D&V_X;8RV6Xm=wv+uyyNHVeJGx52kv6wEB_+>h@@U*P})i|syRF)lPXb>WCU zY6EttzYYtWoo$4v{vMc`^=$hiO7|zzYZ05}WSWWrtcbmJ=IKtpv%|z6&dfHg3r>iL zFY1VFmPE}S4Ce-%wB#n1ieU)kL>LwZS)+S!U$DUvVzN>jd-qt|zBY3d zV0?Z!n%hpHc`~;vW>#3Y&Hu0nbVdTW{4_P6k5psnGV*S?k#th!7#)RPcfBsev#GK2 zIMg?)lI8~roCA+2YMg}{wGLf?-yT1r+=(!FwI0(+g(APJ1-Ll`q&*xi_uFG>CMBw|m zJM0J~E?6ETe~2DaBgBcQ5CxXzg0^eLPKMcPrb)uWssmpBu?ABezSL^F1K(W;V5QG5 z(NzAjb-)o{|>$zPkekR@IQ0b|FX>7-@^RsFDWe|{BXnipSf=0 z{|tt%HW|}5Pi=i|H)D}9veJZ{y}Gi)&e`o-meU1R@z^08BWAXli3&U1e>+^_-itYY zU5(mu{Ar)~uUeR?F@&EcegAnQLsx5yqb{a}Iz_RCV}iw{28K12cYra1zkJ3NCq2xS F-vI8z{{sL3 diff --git a/status/grpc/types_frostfs.pb.go b/status/grpc/types_frostfs.pb.go index 609fc0348f2635087ef0a765fea94e223be2cff6..1d8b4772c2a424133b457182eb1b0b3cf4596d6c 100644 GIT binary patch delta 523 zcmdm&e;{u|v^=L`T4qski9$8kWJ3ipxmtzPoZ?gnUT9`siLsGJg`Q`MCKphW6Qn6KO@TxMrMb!yb4pWVl&qAvCig2y2?LF& z&St`p4`;p;>2`>`C3RWuF&&^$Wmm*WOE}vP*ezlOb$vccd9H&)liRC*W{X9Xrus& jhfGlL8BBg)D8tA#dAE_e2r!B`QB=pOYi|Bybch82T3MN< delta 581 zcmX?*w=aJ~w7g7(o@a`JqOF2~LNymBCue4wf?`@`QE>@~JK5eqOo_8rAvLEs6(Y?E zk+W4uO9YC6G}Ho>=_*KbWTwO@St$WIyX2)@IrB?P^g=W9N{o#(Ko)2MRRR?P5y%pt z9XY9aK#8!#oYGWH%57Jlyjxy!a+8AWhq(G5A`LLPbWPc-RDUjPZQ8mVbG;-E%t}{Bs0syWjnMnWu diff --git a/tombstone/grpc/types_frostfs.pb.go b/tombstone/grpc/types_frostfs.pb.go index e5b67d5cbff78fd8050694f72ddef0db98e512c3..acb1836c7ee54ba3caa721aec30567ed6b5d34db 100644 GIT binary patch delta 397 zcmX@B+oro=C!eiiT4qski9$6OCnslqX^CD?V!2agNvejrj=CmLtX3g4r#KZN4N+;U zkd_D(0?Bbr77&!4Y|1Y-IbT3R5Jk5VQ1|3=e*Z`eQJ^+XkZqZ13Y6QOAixK*TNG$m zg(RhLE*_p m?6O=S?`48qVleq0p9~|{nunQ01&X_-aEC6faMWjGa5bBa?Hs<}8PKjaf;;j9HRzVR7O zRuGUB=FBfG(F;l}cd9H&)lgSb*96K1@cTPs5eMl5BA_uK<8xB;G%ECh3vx0`JX16k z6m1m@KsJEo@LT*4E?pm}JIi!dj7%Lc4=^xaKP+GL6Z5l;mg3%6CTXP91vB%L0o~u(e z%@emq<7T3XP1u{p*%-9D8Yd^AajJ{ncYlITaE|wVx##cw-sjuXjvr4twrbr}V2NK5 z3T&CiV3Ij5v5PrjQU0PRO1+4)OIi6yK9FeaMZMU`^x|XYC^j5@l{b!;{jDLSg%J7M z#V@gI15^BB?#=`oh_lOlj!5_}cw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-@jie=q_r+7Kc$jK$PAw=Ajq8Gg2kLrYRSU8qzFCm*y3y0y1o=PW^Jiq# zBInt$QPdxR%<(b2&0SHu8*JeZKLF-J8|q4@h3tshV}bJ23ZL$GV_|c05GI4SQTJQm PMK1+g!F*+R!`AW-BWLrU diff --git a/util/protogen/internalgengo/json.go b/util/protogen/internalgengo/json.go index 3267955..15facfd 100644 --- a/util/protogen/internalgengo/json.go +++ b/util/protogen/internalgengo/json.go @@ -192,14 +192,17 @@ func emitJSONFieldWrite(g *protogen.GeneratedFile, f *protogen.Field, name strin selector := name + "." + f.GoName - isNotDefault := notNil - if f.Desc.IsList() { - isNotDefault = notEmpty - } else if f.Desc.Kind() != protoreflect.MessageKind { - _, isNotDefault = easyprotoKindInfo(f.Desc.Kind()) - } - g.P("if ", isNotDefault(selector), "{") - defer g.P("}") + // This code is responsible for ignoring default values. + // We will restore it after having parametrized JSON marshaling. + // + // isNotDefault := notNil + // if f.Desc.IsList() { + // isNotDefault = notEmpty + // } else if f.Desc.Kind() != protoreflect.MessageKind { + // _, isNotDefault = easyprotoKindInfo(f.Desc.Kind()) + // } + // g.P("if ", isNotDefault(selector), "{") + // defer g.P("}") g.P("if !first { out.RawByte(','); } else { first = false; }") g.P("const prefix string = ", `"\"`, fieldJSONName(f), `\":"`) @@ -247,7 +250,10 @@ func emitJSONFieldWrite(g *protogen.GeneratedFile, f *protogen.Field, name strin case protoreflect.StringKind: template = "out.String(%s)" case protoreflect.BytesKind: - template = "out.Base64Bytes(%s)" + g.P("if ", selector, "!= nil {") + g.P("out.Base64Bytes(", selector, ")") + g.P("} else { out.String(\"\") }") + return case protoreflect.MessageKind: template = "%s.MarshalEasyJSON(out)" case protoreflect.GroupKind: