[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jun 4 13:53:38 BST 2023


--- Comment #36 from Dmitry Selyutin <ghostmansd at gmail.com> ---
Sorry, on the phone, so briefly.

On **arguments: this is just a way to pass CLI arguments, nothing else. Some
commands operate on a single instruction and I need to know _which_ one.
On tracking db, record and extra: yes the code is, at best, shitty. Basically
what I want is "only filter some specific records to be visited, where record
name matches the CLI arguments". I don't know how to do it, because visitor
expects all records to be visited. Another option would be to pass "parent" as
part of arguments for each visit method (e.g. Record.visit might get db too,
and VisitableExtra would have db and record in its visit method). But this can
be somewhat clumsy too.

I'd like to keep the walking logic inside insndb and provide a way to caller to
adjust how to handle the fact that something is traversed. Callback-based way
suffers from the same issue, though, so it's not specific to context manager.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list