Skip to main content

compute_diff

Function compute_diff 

Source
pub fn compute_diff(
    a: &BTreeMap<String, FnDecl>,
    b: &BTreeMap<String, FnDecl>,
    body_patches: bool,
) -> DiffReport
Expand description

Compute a structural diff between two named fn-decl maps.

body_patches controls whether body-level expression diffs are emitted inside each Modified entry. Pass true for rich output (CLI / review); false for a signature-only diff (faster).

Function-only: type declarations are not considered. Use compute_diff_with_types on the publish path, where the op log must capture type declarations too (else export-git cannot reproduce a compilable module — see alpibrusl/lex-lang#895).