INNER CODE UNIT · Python

run_check

MinaProtocol/mina · maintenance/deps/main.py:255

def run_check(graph: DuneGraph, sources: SourceIndex) -> ExitCode:
    warn_about_collisions(graph)
    baseline = load_baseline()
    forbidden = parse_rules(_read_json(RULES_PATH), "forbidden", required=True)
    failures = collect_failures(graph, sources, baseline, forbidden)

    if failures:
        print(f"Dependency check failed ({len(failures)} problem(s)):\n")
        for failure in failures:
            print(f"  * {render_failure(graph, failure)}\n")
        print("Run `make deps-advice` for the full picture of what can be removed.")
        return ExitCode.FAILED

    print(
        f"Dependency check passed: {len(analysis.budgets(graph))} executables within budget, "
        f"{len(analysis.external_packages(graph))} opam packages, "
        f"{len(forbidden)} layering rule(s) held."
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…