NoahTheDuke / vim-just

Vim Just Syntax
MIT License
85 stars 8 forks source link

Reconsider how we are instructing to install Rust #37

Closed laniakea64 closed 1 year ago

laniakea64 commented 1 year ago

Currently, the README link to the Rust prerequisite points to https://www.rust-lang.org/ and suggests installing Rust via just install-rustup. Both of these are suboptimal, if not problematic:

1) That link is mostly general marketing-ish talk about the benefits of Rust and who uses it. It does its purpose well, but it's not what we need here: we are writing for an audience who wants to install Rust as a prerequisite. An installation instructions page, like we link to for colordiff, would be more suitable.

2) Regarding just install-rustup... let's not. There is a reason the main Rust install page is so blatant where recommending curl | sh: this is generally a bad practice, unless A) the user is fully aware this will happen, and B) the user 100% trusts the URL. The extra layer of a pre-provided justfile recipe takes away necessary advance warning. We don't need to do this, as this recipe is not at all vim-just-specific. Additionally, some dev environments require that installs like Rust be performed offline, so rustup is not always an option.

Proposed solution:

For (1): change the Rust link in the README to https://forge.rust-lang.org/infra/other-installation-methods.html , which provides thorough installation instructions and covers all cases. Even for those who want to use the "default", recommended curl | sh rustup based method of installing Rust, that page is still the best landing page, because it eases the reader in by calling it "the most straightforward, recommended way" while describing it in some more detail, objectively discussing pros and cons, and providing alternatives right there. The main Rust installation page doesn't do this so well: it abruptly jumps into suggesting curl | sh with little explication, while kind of burying other installation methods.

For (2): remove the just install-rustup recipe.

If this is done after https://github.com/NoahTheDuke/vim-just/pull/34 is merged, it will be possible for people who want a just install-rustup recipe to add it to a custom local justfile outside of the repo and run it from cwd tests/ same as before. In the case of someone creating such recipe themselves, the concern is nonexistant because they know what they're putting in the recipe.

NoahTheDuke commented 1 year ago

I'm fine removing the install-rustup recipe. I agree it's problematic to paper over the curl | sh business. But I want to point people to the most recommended install instructions. If you want to include that link, that's chill, but it should be secondary: "To install rust, follow the instructions] on the Rust website. (Other methods are documented here.)"

laniakea64 commented 1 year ago

Thanks for your feedback. In that case, how about writing the Rust bullet point like:

NoahTheDuke commented 1 year ago

That works for me.

laniakea64 commented 1 year ago

All done in https://github.com/NoahTheDuke/vim-just/commit/8cf122870bc56c09a5df3541a89cb954acfdceb3 .