pub fn build_record(
unit: &FnUnit<'_>,
path: &str,
imports: &Imports,
module_bindings: &HashSet<String>,
span: &SpanIndex<'_>,
module_map: &PyModuleMap,
) -> UnitRecordExpand description
Build a language-neutral fxrank_core::record::UnitRecord for unit.
Calls the shared [gather] helper (same as analyze_unit) so the record’s
effects/risks/async_boundary/await_count are byte-identical to the
Hotspot. Also extracts outgoing call references via refs::extract for the
cross-file resolver.
INVARIANT: this recomputes own-body via the same gather as analyze_unit.
This stays correct only while analyze_unit does NO post-gather mutation of
effects/risks (unlike TS, which absorbs React signals and so must copy from the
final Hotspot). If you add a post-gather step here, switch to copying from the
Hotspot or the record’s own-body will drift from it.