-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Use consistent order for messages from mypy daemon #13141
Labels
Comments
I'm working on this right now, but i'm wondering what the best way to store state in-between function calls is, since the client is composed by functions and not by a class. how should i deal with this? Should i just store the file list in args? I also tried changing |
JukkaL
added a commit
that referenced
this issue
Sep 30, 2022
This fixes an annoyance where the messages got reshuffled between daemon runs. Also if there are messages from files that didn't generate messages during the previous run, move them towards the end to make them more visible. Fix #13141.
JukkaL
added a commit
that referenced
this issue
Sep 30, 2022
This fixes an annoyance where the messages got reshuffled between daemon runs. Also if there are messages from files that didn't generate messages during the previous run, move them towards the end to make them more visible. The implementation is a bit messy since we only have a list of formatted lines where it's most natural to sort the messages, but individual messages can be split across multiple lines. Fix #13141.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If mypy daemon generates errors in multiple files, successive daemon runs can change the order of messages even if they are otherwise identical (e.g. the first run produces messages from
mod1
first followed by messages frommod2
, and the second runs produces errors frommod2
first andmod1
next). Try to keep the order of error messages consistent across runs, since the varying order can be distracting when you are trying to fix errors one by one.Suggested approach:
Errors are already sorted consistently within a single file, but not across multiple files.
Another way would be to sort the messages by the file before reporting them, but this would be a bigger change conceptually and might have some issues (e.g. can't stream errors during the initial run). Preserving the order of errors from the immediate previous run shouldn't cause any additional issues. Related issue: #2144
Test cases to cover:
The text was updated successfully, but these errors were encountered: