Re: [PATCH v4 11/11] scripts: generate_rust_analyzer.py: use `cfg_groups`

From: Miguel Ojeda
Date: Sun Mar 23 2025 - 08:41:16 EST


On Sat, Mar 22, 2025 at 2:24 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>
> Declare common `cfg`s just once to reduce the size of rust-analyzer.json
> from 30619 to 2624 lines.
>
> Link: https://github.com/rust-lang/rust-analyzer/commit/2607c09fddef36da0d6f0a84625db5e20a5ebde3
> Signed-off-by: Tamir Duberstein <tamird@xxxxxxxxx>

A note in case it matters for someone out there: that commit appeared
in tag 2024-08-26, but our minimum Rust version is dated 2024-05-02.

I think many developers are using a rust-analyzer that is newer (i.e.
installed independently), but if others install the component that
gets distributed alongside Rust, then I think it appeared in Rust
1.82.0.

So I wonder if we should wait for the MSRV bump to start using this.

Thanks!

Cheers,
Miguel