You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bash extractor: a nested function's defines edge comes from the outer function, so the outer's call to it is lost #5573
A function defined inside another function's body, called from there, loses that call:
outer() {
inner() { echo hello; }
inner
}
The extractor gives inner a defines edge from outer, and outer a calls edge to inner.
The graph keeps one edge per pair of nodes, so the defines takes the pair and the calls is gone.
In bash, inner is a function of the file once outer runs, not a part of outer.
Reproduced on graphifyy 0.9.122 (newest on PyPI), installed with pip, nothing patched, Python 3.12, Ubuntu.
walk() adds the defines edge from parent_nid, which is the outer function inside its body.
Adding it from the file node, as for a top-level function, keeps both edges.
The existing nested-call test (test_extract_bash_nested_function_calls_recorded) is unaffected.
We carry this fix as a local patch and will open a PR.
Activity
github-actions commentedon Nov 28, 2026
Thanks for opening this issue, @yashsaxena. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
fix(bash): a nested function's defines edge comes from its file (#5573)