[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260102103643.352fd5c7.gary@garyguo.net>
Date: Fri, 2 Jan 2026 10:36:43 +0000
From: Gary Guo <gary@...yguo.net>
To: Jesung Yang <y.j3ms.n@...il.com>
Cc: Jesung Yang via B4 Relay <devnull+y.j3ms.n.gmail.com@...nel.org>, Miguel
Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin
<lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl
<aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich
<dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: generate_rust_analyzer: reduce the output file
size
On Fri, 2 Jan 2026 10:04:08 +0900
Jesung Yang <y.j3ms.n@...il.com> wrote:
> On Fri, Jan 2, 2026 at 7:09 AM Gary Guo <gary@...yguo.net> wrote:
> >
> > On Thu, 01 Jan 2026 08:21:24 +0000
> > Jesung Yang via B4 Relay <devnull+y.j3ms.n.gmail.com@...nel.org> wrote:
> >
> > > From: Jesung Yang <y.j3ms.n@...il.com>
> > >
> > > Use the `cfg_groups` field to aggregate common configurations into a
> > > single project-level definition. This avoids repeating identical `cfg`s
> > > across crates.
> > >
> > > As a result, the size of the generated `rust-project.json` is reduced
> > > from 11MiB to 406KiB (about 96% reduction).
> >
> > This feature is not available with Rust Analyzer 1.78.
>
> I suspect you are referring to the rust-analyzer component shipped via
> rustup when the 1.78 toolchain is active.
>
> Do we apply our MSRV policy to rust-analyzer as well? The latest
> rust-analyzer release supports older Rust versions, including 1.78.
This statement is not generally true. Rust analyzer needs the ability to
talk directly with proc macro dylibs and AFAIK it only retains limited
backward compatibility with old rustc versions.
https://rust-analyzer.github.io/book/installation.html also mentions that
the only officially supported version is the latest stable and users are
recommended to use older Rust analyzer versions with older compilers.
> practice, I believe many people who rely on a language server use the
> version provided by their editor extension or IDE, which is usually the
> most recent release. AFAIK, it is actually more difficult to use an old
> release of rust-analyzer, as it often requires extra setup to manually
> downgrade or pin the version.
Many editors just use rust analyzer binaries in the PATH, which can quite
often be the one provided by rustup. I guess the "IDE" you're talking
about here is VSCode, and I just configure it to use the one in path too,
instead of the binary shipped with the extension.
This the Rust analyzer version string of the one that I am using:
rust-analyzer 1.78.0 (9b00956 2024-04-29)
So I'd say while your change is desired, we need to wait until we bump
MSRV to a high enough version as I suspect there're a lot more developers
that use Rust analyzer in the same way I do.
Best,
Gary
Powered by blists - more mailing lists