Re: [PATCH] scripts: generate_rust_analyzer.py: add missing macros -> core dep
From: Tamir Duberstein
Date: Sun Feb 09 2025 - 11:49:14 EST
On Sun, Feb 9, 2025 at 11:43 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Sun, Feb 9, 2025 at 5:39 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
> >
> > I'm not exactly sure what you mean by different sets of crates here.
> > What `cfg`s would you want to pass?
>
> What I mean is that, in principle, `cfg`s can be different for the
> kernel crates vs. the host crates. For instance, we use
> `cfg(no_fp_fmt_parse)` for the kernel's `core`. In practice, it may
> not matter. But, in theory, we should be passing different sets.
Ah, I see! I'm happy to do that in this patch if you think it's worth it.
> > We could, but then it's redundant with the deps section. I'll leave it
> > explicit for now, since it is just one line.
>
> I am not sure what you mean.
The python function `append_crate` takes both `deps` and
`is_proc_macro`, so implying dependencies based on the value of
`is_proc_macro` could create duplication.
> Cheers,
> Miguel