-
Notifications
You must be signed in to change notification settings - Fork 1.6k
something to keep code from being unrefactored for long periods of time #2281
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
Comments
That would make library stabilization akin to a breaking change. |
That's ok, as long as it lets me know when I can stop being stupid. |
In that case I think it would be quite useful. |
I haven't seen it personally yet (I'm still in college after all), but I've heard plenty of stories about how kludges and temporary workarounds end up being permanent simply because no one got around with putting a more robust fix in place. We can't fix developer laziness, but perhaps something like this could help people not forget tasks they defer to later, in general.
|
@eaglgenes101 That sounds quite useful as well, especially in clippy, but the feature is somewhat orthogonal to this one. This proposal will emit the warning / error once stabilization happens and not before wherefore it requires a formal-language syntax with executable content as opposed to free form text. |
Couldn't this be done in a linter outside of rustc? You would not be able to use the same syntax for your annotations, but surely magic comments would be good enough. |
@untitaker I'd prefer that this be inside the compiler since you might not always run the linter especially since clippy does not always work :/ |
@untitaker that doesn't integrate with the currently running compiler. |
How would this tool determine how old a FIXME comment is? That seems like it would require the tool to speak git, mercurial, svn, etc, and I'm not sure we want |
@Ixrec You can simply annotate your FIXME like so: // FIXME 2018-01-15 We really need to improve the performance of X algorithm. |
Can you move the FIXME stuff to another issue/thread? |
I'd like a way for rust to tell the stupid programmer (me) about when their stupid code (my code) can be made less stupid.
More specifically, I'd like something along the lines of:
Currently I have this line somewhere in my codebase, and once TryFrom/TryInto lands, I'll still have that line somewhere in my codebase, because there's no way to make the compiler tell me I can change it. (arrayref crate will probably remain useful until we get const generics.)
The text was updated successfully, but these errors were encountered: