all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pankaj Jangid <pankaj@codeisgreat.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: 59214@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#59214: [PATCH] Alternate rust-analyzer command added
Date: Thu, 17 Nov 2022 15:48:27 +0530	[thread overview]
Message-ID: <8735ahsx3g.fsf@codeisgreat.org> (raw)
In-Reply-To: <875yfem21z.fsf@gmail.com> ("João Távora"'s message of "Thu, 17 Nov 2022 08:13:12 +0000")

João Távora <joaotavora@gmail.com> writes:

> 1. If I was to start developing rust today as a average programmer but
>    Rust newbie and I installed one of these "stable" or "nightly"
>    things, which one would I probably pick?  And would I have a
>    'rust-analyzer' executable in my PATH as a result of that?

If the installation was done using `rustup', as described in the
official page - https://www.rust-lang.org/tools/install, then
`rust-analyzer' executable will not be in PATH.

But as pointed out by Ian, there may be other users who are following
alternate installation methods. So keeping one or the other in server
programs will be annoying for at least one set of users.

> 2. What are the odds that a average Rust programmer understands a
>    message telling her
>
>      "Searching for program: No such file or directory, rust-analyzer"
>
>    and endeavors to create a 'rust-analyzer' script with sth like
>
>      #!/bin/sh
>      rustup run rust-analyzer
>
>    somewhere in this config?
>
>    Node JS/NPM also has this 'npm link' which creates a global link to a
>    given specific version of an NPM package, and that includes ensuring
>    its executables are in the PATH.  Is there such a thing in RustVille?

If user has installed rust-analyzer using some other package manager
from their distribution then this problem won't occur. But if user is
following the `rustup' path then there are features like `rustup which'
that user can use to find the location of executable and then create a
link in an accessible location. It will not be difficult for a GNU/*nix
user. But windows users will have to add the whole directory (return by
`rustup which') in PATH.

I can speak for myself though. It is easy for me to create that
link. But I don't want to touch the directory which is managed by
`rustup'. It would be best if `rust-analyzer' works out-of-box if I just
install, Emacs and Rust (via rustup). Then I would just say,

(add-hook 'rust-mode-hook #'eglot-ensure)

> 3. What are the chances that an average Rust programmer stumbles across
>    the Eglot manual and reaches:
>
>    (with-eval-after-load 'eglot
>       (add-to-list 'eglot-server-programs
>                    ("fools" "--stdio")))
>
>    And understands what to do?

If user is conversant with Emacs, this is ok. If the user is new to
Emacs as well, then he/she might have some difficulty understanding
this.

> 4. The 'rust-analyzer' executable that was once, somehow, an
>    out-of-the-box thing, right?  Why is it not anymore?  Is it
>    temporary, i.e. it coming back in the future?  Or does Rust frown
>    upon these things and inequivocally prefers 'rustup run' from now on?
>    Or was it never an out-of-the-box thing?  If so, why is it in
>    eglot.el as if it was?

I am not sure about this. I have never seen this in my PATH. May be
because I just use `rustup' to install/update, like I use `apt' in
Debian.

> 5. If you take away the current 'rust-analyzer' entry, how many bug
>    reports from annoyed users will we get? 0? 1? Million?

After reading Ian's arguments, I feel that it is best to keep both --
rust-analyzer and rustup ... -- to make it convenient for both
non-rustup users and rustup users.

So the first patch was more suitable.





  reply	other threads:[~2022-11-17 10:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12 11:53 bug#59214: [PATCH] Alternate rust-analyzer command added Pankaj Jangid
2022-11-12 12:03 ` Eli Zaretskii
2022-11-12 12:22   ` Pankaj Jangid
2022-11-12 12:51     ` Eli Zaretskii
2022-11-12 13:09       ` Pankaj Jangid
2022-11-16 17:05 ` Eli Zaretskii
2022-11-16 17:14   ` João Távora
2022-11-16 19:31     ` Eli Zaretskii
2022-11-16 21:06       ` João Távora
2022-11-17  0:12         ` Stefan Kangas
2022-11-17  5:59           ` Pankaj Jangid
2022-11-17  5:57         ` Pankaj Jangid
2022-11-17  8:13           ` João Távora
2022-11-17 10:18             ` Pankaj Jangid [this message]
2022-11-17 10:52           ` M. Ian Graham
2022-11-17 12:51             ` Pankaj Jangid
2022-11-17 18:11               ` M. Ian Graham
2022-11-17 18:20                 ` Pankaj Jangid
2022-11-17 18:47                 ` Eli Zaretskii
2022-11-17 19:43                   ` M. Ian Graham
2022-11-17 21:49                   ` João Távora
2022-11-18  5:13                     ` Pankaj Jangid
2022-11-18  8:29                       ` Eli Zaretskii
2022-11-18  8:44                         ` João Távora
2022-11-17  8:11         ` M. Ian Graham
2022-11-17  8:19           ` João Távora
2022-11-17  9:01             ` M. Ian Graham
2022-11-17  9:07               ` João Távora
2022-11-17 10:32             ` Pankaj Jangid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735ahsx3g.fsf@codeisgreat.org \
    --to=pankaj@codeisgreat.org \
    --cc=59214@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.