Re: [PATCH] scripts: generate_rust_analyzer.py: add missing macros -> core dep
From: Miguel Ojeda
Date: Sun Feb 09 2025 - 12:05:56 EST
On Sun, Feb 9, 2025 at 5:49 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>
> Ah, I see! I'm happy to do that in this patch if you think it's worth it.
I don't know if it is worth it (it requires testing it, I guess) -- we
can go simple until we see we need it, especially for a fix.
> 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.
Yes, but the dependencies for proc macros are a completely different
set -- that is what I was discussing above. And those dependencies
will be shared across all proc macros, when/if we have several
eventually (e.g. per subsystem).
That is why, since we already have `is_proc_macro`, I think we should
just use that. It may make sense to split `append_crate` into two
functions or similar, e.g. having a `append_proc_macro_crate` (that
perhaps does not require any dependencies) -- it would be the same
idea but cleaner.
Anyway, the simpler the change, the better, especially for a fix. But
please take it into consideration.
Cheers,
Miguel