mirror of
https://github.com/jqlang/jq.git
synced 2026-10-12 02:16:58 +00:00
block_mark_referenced walks the joined block backwards and skips the
body of any definition not yet marked referenced, so a library must
precede its importers. f58787c41 registered a library before walking
its dependencies, to have somewhere to keep the `loading` flag, which
reversed that order and made block_drop_unreferenced free definitions
that are still referenced through bound_by.
Keep the libraries being loaded on a stack threaded through the
load_library frames instead, so registration can move back after the
dependency walk.
4 lines
76 B
Plaintext
4 lines
76 B
Plaintext
import "deep3" as m;
|
|
import "data" as $d;
|
|
def f: [22, m::f, ($d | length)];
|