-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
refactor(ui): use named functions for better tracing #12062
refactor(ui): use named functions for better tracing #12062
Conversation
- convert several functional components and plain functions to use named functions - instead of consts assigned to anonymous functions - named functions are better for tracing since the name shows up in stack traces etc - instead of "anonymous" - still a good amount of these leftover, but I think I got over 50%+ now Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
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.
still a good amount of these leftover, but I think I got over 50%+ now
Maybe cover 100% in the same PR?
I can, but I stopped part-way in and this is still independently mergeable as is. No need to wait for no reason IMO |
I would appreciate a combined PR instead of tiny PRs with trivial changes. |
What is the purpose of that? That seems like unnecessarily slowing down contributions. I don't see what benefit there is to that. This is ~75 LoC of better tracing. I'd rather have that than not. Or wait indefinitely for ~150 LoC of better tracing. This was non-trivial to code (it is manual), and that's why it was tiring to do so and why I stopped part-way. (to be clear, it is simple, no doubt, but it is very tedious. that's one of the reasons I hadn't done this earlier. especially as there are some rough edges due to very similar but semantically different syntaxes in modern JS (unfortunately) that require some more care -- I've intentionally left those out of this PR and only changed the exact same syntaxes here) |
Motivation
Modifications
convert several functional components and plain functions to use named functions
still a good amount of these leftover, but I think I got over 50%+ now
Verification
these are stylistic changes outside of traces; they are otherwise semantically equivalent