Repository navigation
Tidy the match graph fetch: closing message, kept reason, no double opens - #44
Conversation
…pens Follow-ups to fetching a match's remote function off the UI thread: - After the graph opens, the activity line says "Opened the graph of function N." instead of staying on "Fetching function N for the graph viewer...". - A raising request reported its reason through _reportFailure, which "Failed to fetch function entry N." then overwrote. queryRemoteFunction now reports a raised error once, with the function and the reason, and posts the generic line only when the server answered without the entry. queryFunctionEntryById and querySampleEntryById had no other callers and are folded into it. - Function Scope and Block Scope ignore a double click on a match whose graph is still being fetched, which opened two identical graphs. - The changelog says that on IDA the click still waits for the remote function, though no longer for its sample.
queryRemoteFunction read the function's CFG with toSmdaFunction() after its try block, so a malformed CFG raised out of the request instead of answering None. The widgets then never got their answer, and the id they had marked as being fetched stayed marked, so double clicking that match did nothing for the rest of the session. The CFG is now read inside the try and reported like any other failure. Block Scope's repeat-click guard and closing message get a test too.
|
#36, #38 and #46 are merged, so this conflicts with |
|
One more thing for the merge: with both sides of the conflicts kept, the two new tests in
Extending the fakes should be enough. Otherwise, I read the PR ahead of the merge and have nothing to add, so once |
Keeps familiary#36's _shown_function and _shown_block next to _graph_fetches, and extends the match graph tests' fakes for the local tint step familiary#36 added to the graph-opening path: show_local_match_coloring on the backend, an "a" side in the matcher's colouring and a local SMDA report for Block Scope.
|
Done in 6e6a6ed: I merged |
danielplohmann
left a comment
There was a problem hiding this comment.
Thanks. 6e6a6ed resolves both conflicts as discussed: __init__ keeps _graph_fetches next to #36's _shown_function/_shown_block, the changelog keeps your longer bullet, and the fakes in test_match_graph.py cover #36's tint step. Lint, the sync checks and the suite pass on main plus #39 plus this branch (272 tests).
These are the four optional points from the review of #40, left out of it so its approval stood.
_reportFailureposted the reason and "Failed to fetch function entry N." then overwrote it.queryRemoteFunctionnow reports a raised error once, as "Fetching function N for the graph viewer failed (request timed out).", and posts the generic line only when the server answered without the entry.queryFunctionEntryByIdandquerySampleEntryByIdhad no other callers and are folded into it.Testing
test_a_raising_request_keeps_its_reasonandtests/ui_qt/test_match_graph.py(repeat double click, closing message) fail without the change.ruff format --check,ruff check, the sync checks andpython -m pytest tests(242 tests) pass.