-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Compiler UX Guidelines RFC #1246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Don't forget the user. Whether human or another program, such as an IDE, a | ||
good user experience with the compiler goes a long way into making developer | ||
lives better. And when developer lives are better, they can make their users' | ||
lives better as well. We don't want users to be baffled by compiler output or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather have the "when developer lives are better" sentence removed. The first part does not necessarily follow the second.
@tshepang I did both changes. The latter does follow though. If developers are spending less time trying to learn their tools due to accidental complexity in the tools, that's less time they can spend working on their customer's actual needs. Of course, they could spend the time somewhere else (e.g. drinking a beer), but that's why the word was "can". But it's fluff nonetheless, so was for the best to be removed anyways. |
* The word "illegal" is illegal. Prefer "invalid" or a more specific word | ||
instead. | ||
* Errors should document the span of code where they occur – the `span_..` | ||
methods allow to easily do this. Also note other spans that have contributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'note' should be formatted as code.
* When talking about the compiler, call it `the compiler`, not `Rust` or | ||
`rustc`. | ||
|
||
### Compiler Flags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we want to ask implementers to think about orthogonality when adding flags, e.g. if we'd have a json-emitting variant of multiple actions, an additional --json
flag could be better than adding --first-action-json
, --second-action-json
, ... for each action.
Why is there no shepherd assigned to this RFC? |
@llogiq because the compiler team has only recently started having having regular triage meetings. we're assigning one now. :) |
Is there any reason to not go into "final comment period"? |
A shepard was only even assigned a day ago, so I would think it's a bit early. (ie, it's their job to asses this question 😄 ) |
cc @wycats |
So I gave this a read. I agree that it seems to reflect current practice, which was the goal. I have some thoughts about things we might do to improve, but this is presumably not the place to argue them. Anyway, TL;DR, seems good to me -- that said, I do think it's worth considering just where these guidelines ought to live long term. An RFC doesn't quite seem right. A ux-guidelines.md file in the source repo is perhaps better. (What directory?) |
Fixed the missing closing quote; I originally proposed adding a file directly to the rustc, but that issue was closed in favor of having an RFC to bikeshed and come to a consensus that they were good guidelines. The original goal has always been to have this file handy for developers in the rustc repository. As for which directory - I'd say just shove it into But I definitely want to be the person who puts it there -- I (selfishly) want my name on the commit so I can point to others exactly how I've contributed to the Rust project. I'd also really like to hear your thoughts on what can be improved that's not currently being done. Possibly with a blog post; possibly with RFC(s) to add them as new guidelines? |
* The `--verbose` flag is for adding verbose information to `rustc` output | ||
when not compiling a program. For example, using it with the `--version` flag | ||
gives information about the hashes of the code. | ||
* Experimental flags must be behind the `-Z` flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also a family of options that are collectively guarded by -Z unstable-options
, but perhaps that is transitively covered by the above bullet.
@Havvy hi The compiler team discussed this recently. I think we all agree that the document you've written here codifies our current practice, and that we just need to resolve the bikeshed of where to put it. Beyond that, here are some personal opinions: I personally have no problem with putting the document into The file itself should probably be named
Anyway, having said all that, I suspect that if no one else chimes in soon (within a day or two) then a great next step would be to just open up a pull request that creates the aforementioned file in |
See rust-lang/rfcs#1246 for discussion.
See rust-lang/rfcs#1246 for discussion.
@pnkfelix This can be merged or closed, yes? |
@Havvy yah thanks |
This RFC proposes conventions for the user experience of the rust-lang/rust compiler.