[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+tqQ4+rG9XdT1s7X0YjEKdS+-S8p2yFpt2EokQz5fqg=5=2xg@mail.gmail.com>
Date: Fri, 2 Jan 2026 22:06:13 +0900
From: Jesung Yang <y.j3ms.n@...il.com>
To: Gary Guo <gary@...yguo.net>
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, Jan 2, 2026 at 7:36 PM Gary Guo <gary@...yguo.net> wrote:
>
> 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.
You're right, I missed that point.
> > 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.
Overall, I think I overlooked the diversity of local setups; I was
indeed focused on the VSCode extension's default behavior.
Thanks!
Best regards,
Jesung
Powered by blists - more mailing lists