this post was submitted on 08 Jul 2023
7 points (100.0% liked)
Rust Lang
3 readers
1 users here now
Rules [Developing]
Observe our code of conduct
- Strive to treat others with respect, patience, kindness, and empathy.
- We observe the Rust Project Code of Conduct.
- Submissions must be on-topic
- Posts must reference Rust or relate to things using Rust. For content that does not, use a text post to explain its relevance.
- Post titles should include useful context.
- For Rust questions, use the stickied Q&A thread. [TBD]
- Arts-and-crafts posts are permitted on weekends.
- No meta posts; message the mods instead.
Constructive criticism only
- Criticism is encouraged, though it must be constructive, useful and actionable.
- If criticizing a project on GitHub, you may not link directly to the project’s issue tracker. Please create a read-only mirror and link that instead.
- Keep things in perspective
- A programming language is rarely worth getting worked up over.
- No zealotry or fanaticism.
- Be charitable in intent. Err on the side of giving others the benefit of the doubt.
No endless relitigation
- Avoid re-treading topics that have been long-settled or utterly exhausted.
- Avoid bikeshedding.
- This is not an official Rust forum, and cannot fulfill feature requests. Use the official venues for that.
No low-effort content
- Showing off your new projects is fine
No memes or image macros
- Please find other communities to post memes
No NSFW Content
- There are many other NSFW communities, let’s keep this related to the language
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You need to tell the user that this is an error, otherwise they don't know if it succeeded or not.
The last line is incomprehensible, just use a full sentence.
So add "Error:" at the beginning? Looks a bit better, right.
Last line is more or less copy of the command line user gave with markers indicating bits parser does not like.
I'd recommend adding the markers on a line below the text, in a similar way to how rust compiler output indicates errors.
Also WIN isn't really clear to me what it's supposed to mean, does it mean that flag "wins" and takes precedence over the other conflicting flag? Does that even matter if the program exits with an error anyway?
It is easier for the rust compiler to do so since rust files are always valid utf8 and formatted to be of reasonable size. Doing the right thing with
OsString
is harder, plus lines can be long and trimming it enough that it still fits on a line above all that while also dealing with unicode shenanigans... That's why I'm trying to do things inline where most of those thingsRight. Wording can use more work :)
Hmm... Interesting question. I guess it is less useful in this case but I can imagine some stranger situations. Plus I'm trying to create more detailed/user friendly error messages - one is text description "FOO is required" and the other one shows place where exactly this "FOO" is required.