Rust for Linux List
 help / color / mirror / Atom feed
From: Tamir Duberstein <tamird@kernel.org>
To: Andreas Hindborg <a.hindborg@kernel.org>
Cc: "Malte Wechter" <maltewechter@gmail.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Jesung Yang" <y.j3ms.n@gmail.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust-analyzer: update generate_rust_analyzer to pass cfg to macros crate
Date: Mon, 11 May 2026 10:40:44 -0400	[thread overview]
Message-ID: <CAJ-ks9mOrETyFMFpn9yrZ960=O2CV6BKBxkNoo42vGzv_LPFgQ@mail.gmail.com> (raw)
In-Reply-To: <87jyta5ymz.fsf@t14s.mail-host-address-is-not-set>

On Mon, May 11, 2026 at 1:00 AM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>
> Andreas Hindborg <a.hindborg@kernel.org> writes:
>
> <cut>
>
> >> Directionally I think this patch is incorrect because the macros crate
> >> is a host-side crate and generated_cfg is for target-side cfgs.
> >
> > We might want to differentiate macro implementations based on kernel
> > configuration, or as in our case, skip compilation of certain macros
> > when they are not used in the kernel build.
>
> Also, the `macros` crate is actually built with these configuration
> attributes applied. It is only logical that the `rust-analyzer`
> configuration reflect how we build the crate.

Hi Andreas,

These justifications should be in the commit message. I agree that the
`macros` crate is receiving those cfgs, that was added in 36174d16
("rust: kunit: support KUnit-mapped `assert!` macros in `#[test]`s") -
this should also be mentioned in the commit message please.

      reply	other threads:[~2026-05-11 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  7:04 [PATCH] rust-analyzer: update generate_rust_analyzer to pass cfg to macros crate Malte Wechter
2026-05-08 13:05 ` Tamir Duberstein
2026-05-09  8:01   ` Andreas Hindborg
2026-05-11  5:00     ` Andreas Hindborg
2026-05-11 14:40       ` Tamir Duberstein [this message]

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='CAJ-ks9mOrETyFMFpn9yrZ960=O2CV6BKBxkNoo42vGzv_LPFgQ@mail.gmail.com' \
    --to=tamird@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=maltewechter@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=y.j3ms.n@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