From d28815f7b8bcbfcd5f440e1b1f18d418db101f7c Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 2 May 2023 12:57:29 +0200 Subject: [PATCH] msggen: Disable grpc response -> json response temporarily We use overrides that omit fields in some cases, which makes the conversion lossy. This also means that until we complete the mapping we can't reconvert back. --- cln-grpc/src/convert.rs | Bin 169317 -> 109028 bytes cln-grpc/src/test.rs | 16 ++++++++-------- contrib/msggen/msggen/gen/grpc.py | 7 ++++++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/cln-grpc/src/convert.rs b/cln-grpc/src/convert.rs index e03a20816b06215867c499f2b65f334ecd69e439..052269e451763c5233c296101b04362a5c1f34b3 100644 GIT binary patch delta 11 TcmaF5itEW`wuUW?PgVi|C9MV- delta 10621 zcmeHNdsI{BmS3Mj2#|!3gak-J0)l|Z%lfFG5W(UbP+RLQB1VXcJd%>2;tPDWStT)tMyv#RkYL9HSM)(y=_;owu*gN>jNLv-nQC;T{E+$+Uk6dlbn;NckG(Gx@OiI z{$QQ&J30I8Z$E!~?{oDt*|j}kEpMW$yYc=>sJ~%^!&6;9!&%bUP~@kr$~8SF=boRyWkX6#b$zub$2!X~FDJ)QU+JuJr1Y-LpqqGm4T^>09ZG2H z5v~&N)sx?d_b!|c)dxIWIm=#O@2C}jliX7kDL!9aKgU^J$w}ZlMQAv_GzkT11@4Ab zRT17f^U&2Z7CL)sdbp;;&ppTCI~!3PJQ<|M-7b_0Yl7nOK{qmjtvr{J08OwilsxQm z*1H{UNC{3*N{(Gn4F|M+AuCAF>AVxBhx$?Bl!OJ!f|PJ4I25m*iqde05e30OnGu^8 zqj22OfYjnE-jGGX4OuLlm1)8y#KB&Wxp6a^2(7)9_<$Rkpme+v_Jk-R#B*0VYn=_E zQ2sq69@jpDR9MxDl#neSBv~z!50I=rlMj}x{y5i+4=+HG>Lt%;7x&Z0%kK<8{VS06aRdxN$ z9P319og<|(Ls(;EM=AKoI`Xq^tBG6=mC0decs3K;x^g-E8a{wtO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WlDF0 zq4V2t_~ctQF_26L$O#nwb%E_#6jXdC_nut_JH9IqkRoo{MG_J1_$>LJw^c}G7D None: # First pass: generate any sub-fields before we generate the @@ -437,6 +439,9 @@ class GrpcUnconverterGenerator(GrpcConverterGenerator): for f in field.fields: name = f.normalized() + if overrides.get(f.path, "") is None: + continue + if isinstance(f, ArrayField): typ = f.itemtype.typename mapping = {