Closed kangalio closed 3 years ago
(note: i am not actually an official maintainer of rustbot)
Thank you for the nice feedback. Let's see what technetos or Khionu have got to say about it
The current maintainers expressed that they are only willing to accept a PR with collective changes if I create a list of changes for them to pick from, so here it goes:
That was a miscommunication, whatever changes you want merged from this list need to be separate PRs.
- Macro expansion command
Totally, would love to see a PR for this
- Run rustfmt on macro expansion command output: Rust's raw macro expansion output is borderline unviewable due to its absolutely messed up formatting. Attempting to run rustfmt on its output makes the output so much nicer to look at
This could be part of the PR for 4
- Syntax highlighting for playground command responses
I agree with @tinaun this is kind of excessive for all outputs that are not necessarily rust code. But for godbolt and for macro expansion I think its a great idea.
- Fix clippy lints
Sure! Please make a PR for this, you could combine this with the changes to have clippy lint on CI or not.
- Replace the heavy state machine argument parser with a more lightweight, easy to use and flexible argument parser
Heh, I like the state machine, it works quite well and we can do some interesting things with it.
- Print a Discord reply when an error occurs during command execution
Every error should not necessarily get propagated to the user. This is slightly security related and merits a longer investigation.
- Use &Args everywhere: previously, some places used Args while other used &Args. The inconsistency can trip you up
Args
is passed into the commands by move to allow the commands to do whatever they want with Args
. The other places where we pass Args
by reference are pretty much all functions designed to be called from within a command that owns Args
.
- Inline superfluous HOUR constant: it was only used in a single place, and the indirection caused by this constant were causing more reading difficulties than it solved
I like to keep constants together, the jobs thread is likely to expand in the future and having the constants in a single place will be good. Additionally, I prefer constants over magic numbers sprinkled in the code.
- Add ?cleanup command to delete lengthy bot output
This is a neat idea, since users cant delete their own messages, I suppose its not possible to delete the command output either.
Id like to explore this alittle more but if you have a PR ill happily take a look!
- Broadcast typing animation on command execution: the Playground has relatively long response times, in the realm of 3+ seconds. By broadcasting the typing information, users get immediate feedback for commands, which is more pleasant and user-friendly
I prefer sending a temporary message, then updating it with the results.
Is there any update on this?
No, I've given up on the proposal because of the immense amount of work required: "whatever changes you want merged from this list need to be separate PRs."
In a fork of this repository, I have implemented multiple dozens of changes and fixes. It would be cool to get a return back on the work put into this, so I'd be quite happy if some of that work was merged into this repo.
The current maintainers expressed that they are only willing to accept a PR with collective changes if I create a list of changes for them to pick from, so here it goes:
fn main
optional in?play
?playwarn
; instead automatically showing stderr when it contains useful info?eval
dynamically behave like?play
when a user accidentally includedfn main
: this behavior is more streamlined for the user than having to switch commandsCompiling playground
,To learn more, run the command again with --verbose.
, etc.)?docs serde::something
, the bot would search for a crate namedserde::something
- which will obviously produce garbage resultspub(crate)
withpub
&Args
everywhere: previously, some places usedArgs
while other used&Args
. The inconsistency can trip you upHOUR
constant: it was only used in a single place, and the indirection caused by this constant were causing more reading difficulties than it solvedSendSyncError
andError
and replace all remaining instances ofBox<dyn std::error::Error>
with the designated type aliases?cleanup
command to delete lengthy bot output