From: guilherme giacomo simoes <trintaeoitogc@gmail.com>
To: miguel.ojeda.sandonis@gmail.com
Cc: a.hindborg@kernel.org, alex.gaynor@gmail.com,
aliceryhl@google.com, benno.lossin@proton.me,
bjorn3_gh@protonmail.com, boqun.feng@gmail.com,
fujita.tomonori@gmail.com, gary@garyguo.net,
linux-kernel@vger.kernel.org, ojeda@kernel.org,
rust-for-linux@vger.kernel.org, tahbertschinger@gmail.com,
tmgross@umich.edu, trintaeoitogc@gmail.com,
walmeida@microsoft.com, wcampbell1995@gmail.com
Subject: Re: [PATCH] rust: macros: add authors
Date: Fri, 6 Dec 2024 18:19:05 -0300 [thread overview]
Message-ID: <20241206211905.444952-1-trintaeoitogc@gmail.com> (raw)
In-Reply-To: <CANiq72neo_RtANWJu_GW5LxsR5KWxriS1L8nsXkNn7ioiaEQKQ@mail.gmail.com>
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrotes:
> There are several ways we could do this:
>
> - A single field, that only accepts a list.
>
> - A single field that accepts both a string or a list.
>
> - Two fields like this (that cannot coexist).
>
> - Accepting several "author" fields and append them all into a list.
I maked this change like this way because in my thoughts I just thought about:
- A single field, that only accepts a list.
- Two fields (author and authors).
And how in the first option I would need found all modules that have the author
tags and I would need change the code (from `author: "author"` to `author:
["author"])`, I was think that is the best don't change in a thing that is
already work well. And this is why I choose the second option "Two field". And
if the new developers need include two or more authors, he can make this since
now.
But now, that you put the option "A single field that accepts both a string or
a list" for me this make sense too. I think that the A single field that
accepts both a string or a list, and two fields (author and authors) is the
two best options.
I don't like the options:
- A single field, that only accepts a list.
Because we need found all module
that use the author and change his implementation.
- Accepting several "author" fields and append them all into a list.
because in the modules the developers would need a several author field if the
module is development for several author. And the module! macro would grow a lot.
Like:
author: guilherme,
author: miguel,
author: another_poor_developer,
....
> > - for alias in aliases {
> > - modinfo.emit("alias", &alias);
> > - }
> > + modinfo.emit_arr_str("alias", &aliases);
>
> Spurious change? Or am I missing something?
I make this change because, the for() would need repeat for the alias and for
the authors and for avoid unnecessary code repetition I create the
emit_arr_str() function.
> In addition, there was a PR [1] by Wayne (Cc'd) that implemented the first
> approach, but it was never sent to the list. I pinged in the GitHub issue
> too.
..
> Also, this patch should update the documentation of the macro.
About this, I will sent a v2 PATCH with this informations
next prev parent reply other threads:[~2024-12-06 21:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 19:22 [PATCH] [PATCH] rust: macros: add authors guilherme giacomo simoes
2024-12-06 20:17 ` Miguel Ojeda
2024-12-06 21:19 ` guilherme giacomo simoes [this message]
2024-12-06 22:42 ` Miguel Ojeda
2024-12-07 1:47 ` guilherme giacomo simoes
2024-12-07 10:14 ` [PATCH] " Daniel Sedlak
2024-12-07 16:07 ` guilherme giacomo simoes
2024-12-09 12:21 ` Daniel Sedlak
2024-12-09 11:47 ` [PATCH] " Miguel Ojeda
2024-12-09 12:29 ` Daniel Sedlak
2024-12-09 13:14 ` guilherme giacomo simoes
2024-12-09 12:55 ` guilherme giacomo simoes
2024-12-09 3:59 ` [PATCH] " kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241206211905.444952-1-trintaeoitogc@gmail.com \
--to=trintaeoitogc@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tahbertschinger@gmail.com \
--cc=tmgross@umich.edu \
--cc=walmeida@microsoft.com \
--cc=wcampbell1995@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox