Re: [PATCH v4 2/4] ynl_gen: generate Rust files from yaml files
From: Alice Ryhl
Date: Thu May 07 2026 - 06:04:36 EST
On Tue, May 05, 2026 at 05:16:37PM -0700, Jakub Kicinski wrote:
> On Tue, 5 May 2026 09:10:17 +0000 Alice Ryhl wrote:
> > On Mon, May 04, 2026 at 04:58:58PM -0700, Jakub Kicinski wrote:
> > > On Mon, 04 May 2026 09:04:55 +0000 Alice Ryhl wrote:
> > > > tools/net/ynl/pyynl/ynl_gen_c.py | 139 ++++++++++++++++++++++++++++++++++++++-
> > >
> > > No. Rust. In. This. File.
> > >
> > > Just commit the artifacts. I truly hope that this is the only Netlink
> > > family we will have in Rust.
> >
> > There's no reason to react like this. I have not ignored your concern.
> > Last time we discussed this, the discussion ended on splitting the file
> > into ynl_gen_c.py and ynl_gen_rust.py, which you did not reply to, and I
> > actually spent some time working on that. However, I felt the change was
> > non-trivial and I wanted to discuss whether that was the correct way
> > forward before spending more time on it. Therefore, I kept this patch
> > as-is for now and noted why it was non-trivial (sharing of CodeWriter)
> > in the commit message, until we could discuss further.
> >
> > I think you are probably right that just comitting the artifacts is the
> > simplest way forward for now. Especially since Donald is apparently
> > working on splitting up the file for strace [1]. On the off-chance that
> > a second Netlink family is ever added, hopefully Donald's work has
> > already completed and we can easily add this support in a new file when
> > the time comes.
> >
> > I guess another way forward is to commit a copy of the python script
> > with the Rust support to drivers/android/binder/ and I can run it
> > manually if the Binder yaml file is ever updated.
>
> Could you _please_ do what I'm asking you to do instead inventing your
> own solutions. Just commit the generated files and leave the script out.
> We lived without Netlink code gen for 30 years.
I will drop the patch in the next version.
Alice