From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59214: [PATCH] Alternate rust-analyzer command added Date: Thu, 17 Nov 2022 20:47:52 +0200 Message-ID: <83o7t5ct9j.fsf@gnu.org> References: <87o7tc2xu8.fsf@codeisgreat.org> <83leoag78l.fsf@gnu.org> <83fseig0h0.fsf@gnu.org> <87sfiirulw.fsf@xyz.invalid> <878rk9921c.fsf@codeisgreat.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23625"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59214@debbugs.gnu.org, pankaj@codeisgreat.org, joaotavora@gmail.com To: "M. Ian Graham" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 17 19:48:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovjvu-0005va-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Nov 2022 19:48:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovjvg-00032a-6e; Thu, 17 Nov 2022 13:48:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovjve-00032N-G6 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 13:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovjve-0004l8-66 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 13:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovjvd-0000vF-OH for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 13:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 18:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59214-submit@debbugs.gnu.org id=B59214.16687108793522 (code B ref 59214); Thu, 17 Nov 2022 18:48:01 +0000 Original-Received: (at 59214) by debbugs.gnu.org; 17 Nov 2022 18:47:59 +0000 Original-Received: from localhost ([127.0.0.1]:34331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovjva-0000uj-J7 for submit@debbugs.gnu.org; Thu, 17 Nov 2022 13:47:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovjvZ-0000tx-0V for 59214@debbugs.gnu.org; Thu, 17 Nov 2022 13:47:57 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovjvT-0004fy-Cw; Thu, 17 Nov 2022 13:47:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=4COOAjI0SJzkltANuGeMjNZO1zpI57sizWO8zAnq4Ks=; b=bOGhbfDndvjwNOOzEgN6 a9zTiwfd0HGDopzMYb57rljN2rqYtf1sbAAK1Ob4q0zTmvmnxMRhyajxARQgGN7p0M6Iia8fQLDf7 7pxomNEb1QvGSWrs8K97H1UmwbuzrbWaoaT7kld9No9N2ApEoNv5WZxpMlfq6ciURPUxDKbNKFzar iUvbZQen1/9QF0/q2CSLyJTOqMg4f4qHH2KZ6ISvBjPFsTzJCEjTfAwf6O6SZ/g0yH3y9m9iQBuw4 XS94XDtNjBnh3vQeFKf64QAQkwFzLGh2gNXz96+Tkq9m8GZjq8uAE0DLSR7wlmrbI54tJj3Jo8sCn +4Y57hlcAbB7zQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovjvS-000239-Ml; Thu, 17 Nov 2022 13:47:51 -0500 In-Reply-To: (hello+emacs@miangraham.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248136 Archived-At: > Date: Thu, 17 Nov 2022 18:11:32 +0000 > From: "M. Ian Graham" > Cc: 59214@debbugs.gnu.org, Eli Zaretskii , João Távora > > Pankaj Jangid wrote: > > > -(defvar eglot-server-programs `((rust-mode . ,(eglot-alternatives '("rust-analyzer" "rls"))) > > +(defvar eglot-server-programs `((rust-mode . ,(eglot-alternatives '("rust-analyzer" "("rustup" "run" "stable" "rust-analyzer") "rls"))) > > I just noticed this quote from the announcement at https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#rust-analyzer-is-now-available-via-rustup : > > > At this time, to run the rustup-installed version, you need to invoke it this way: > > rustup run stable rust-analyzer > > The next release of rustup will provide a built-in proxy so that running the executable rust-analyzer will launch the appropriate version. > > So the current situation is temporary. A rustup-side fix is coming. Once it arrives, the right answer--even for rustup users--will be "just add what you want to PATH and eglot will defer to your environment." Rustup will do this for them automatically, for the rust version of their preference, and eglot will just work. > > In the meantime, as is, rustup users have the option of symlinking rust-analyzer into .cargo/bin or adding its location directly to PATH. Anyone not comfortable doing this is also probably not running emacs from master, so they're unlikely to benefit from a short-term elisp fix until the problem goes away. And if emacs adds code depending on rustup, subsequently removing what should theoretically be a temporary fix will in practice break users remaining on older rustup versions. > > Unless I'm misunderstanding the situation above or something has changed since the announcement, to me it seems prudent to wait on rustup's fix and avoid letting emacs develop an opinion about the installation method or version details of external components. FWIW, I think Rust is too crazy for us to follow its daily changes and offer support for its server OOTB in eglot-server-programs. Emacs is not equipped to follow such frequent and radical changes. If we want to make this seamless for users of Rust, we should provide a special command to update eglot-server-programs with whatever it is the latest Rust fashion. Or maybe we should even leave that to Rust mode.