Unintelligible Error Messages Make Troubleshooting Rust Impossible - Please FIX!
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem you are trying to solve
This needs to be fixed. I've had to spend over an hour trying to install ONE crate. First, I thought I had to update my version of Rust. No problem. But wait, no - I'm on the "wrong channel", so now I have to switch to Nightly.
Ok...no biggie. rustup default nightly. Okay, great. Finally, let's download this project and get running.
NOPE. Another compilation error. Apparently, cargo-features = ["edition2021"] isn't added. But wtf does that mean? Is this an environment variable? Does this get added to a Cargo.toml? If so, which one? I'm in the root of the project directory I'm trying to use. I'm also not understanding where Rust is seeing that I need to opt for this edition as a default. Also, if so, what's the big deal? Its 2022 right now. No matter, I'm being literal.
I need to download this project, so let's play along and see what's going on here. I run the command again and pay a little more attention to the output this time.
Updating crates.io index
error: failed to download `pest v2.5.1`
Caused by:
unable to get packages from source
Caused by:
failed to parse manifest at `/home/libre/.cargo/registry/src/github.com-1ecc6299db9ec823/pest-2.5.1/Cargo.toml`
Caused by:
feature `edition2021` is required
this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["edition2021"]` to enable this feature
Now I'm starting to rage a little bit. What do you mean, "this cargo does not support nightly features, but if you switch to nightly channel you can add cargo-features = ["edition2021"] to enable this feature"?
After I carefully read that sentence 2-3 times, I'm now really raging because I don't understand what the fuck it means in plain English because its worded so poorly.
edit: Sorry for profanity but we're adults and I'm not calling anyone names here, so please do not dilute / wave off my issue for some profanity. That's worse than the profanity itself
- "This cargo does not support nightly features" - Ok, so why tf do I need to use a nightly feature? Now, I'm thoroughly confused as to what's going on. This has gone from git cloning a simple project and running
cargo build& a couple of other commands (or so I thought), to an actual fishing expedition. - "..but if you switch to nightly channel" - I thought I just did that. I explicitly ran
rustup default nightlyright on the command line and received confirmation directly on stdout that the toolchain had been switched. So now I'm even more irritated because now I don't know wtf is actually going on. Is the Rust installation broken or what? Thinking about aborting mission entirely on even installing the project, but I figured, "Nah, you came this far - stick w the course". Huge mistake. - "you can add
cargo-features = ["edition2021"]to enable this feature - This is where I lost it. Understand that in these three separate points I've listed here, I've identified three conflicting directives from the toolchain's output. So, I actually have no clue what's going on. This is ridiculous at this point.
I speak fluent English. I also type 180+ WPM. If you guys need someone to look over your error messages for free and convert them into coherent directives that actually provide users with useful contextual information then I'd be more than happy to contribute, because this is unacceptable on every level imaginable.
In case you guys didn't catch it, I was (a) initially told the issue was with the cargo itself not supporting the nightly features (b) despite this, I was still told that I could fix the problem by switching to the 'nightly channel' [which I already did] (c) then I was told that in order to switch to the nightly channel I'd have to add cargo-features = ["edition2021"]...which now contradicts (a)....and all of this was in ONE sentence.
Additionally, at no point in time does the error message state WHERE to put this cargo-features = ["edition2021"] line at. Its clearly not an environment variable & I'm not making it one because it would likely break any other installation process / I don't see the need for doing so. However, I did add another config flag to my install / build command that specified the toolchain. Of course...that didn't work either. Perhaps this needs to be added to the Cargo.toml file - that's fine. Except there's a syntactical ordering to that file, so it would've helped if there was some directive given about that rather than just reiterating a blanket, uninformative frankly lazy error prompt that provides no further enlightenment on how to fix the situation or what the situation even is.
This Needs to be Addressed
Its honestly unacceptable on many different levels. I get that Rust is an open source language, but I'm not judging it based on that. I'm judging it on the basis of what the project can be - and this is not sufficient. Whatever is going on here, its clear that someone got lazy on the documentation / error / writing end and that's now left us in a situation where there's a problem that's virtually unfixable because the error being spit out is unintelligible.
Again, I'd be more than happy to contribute some semantic descriptions / error messages if that'll help because I have a strong grasp of the English language or its at least strong enough to where I would be able to help this project write coherent feedback from the various toolings of Rust.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported cargo-features = ["edition2021"] error while installing pest v2.5.1, then trace where rustup or the toolchain produces this message. Done means the output clearly explains the situation and where the suggested configuration belongs, with coverage for the reported scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100