MoonDepSolve is a MoonBit library and native CLI for semantic versions, deterministic dependency resolution, lock output, dependency graphs, conflict reports, and exact upgrade planning.
MoonBit ecosystem tools need a small, reviewable dependency core: parse versions, match version ranges, choose compatible package versions, explain conflicts, and write stable lock output. MoonDepSolve keeps that boundary narrow so it can be reused by package managers, build tools, dependency audits, and release automation.
v0.3 Highlights
HighestCompatible chooses the highest compatible package set through the existing resolver.
MinimalChange searches bounded candidate states, first minimizing changed packages and then preferring higher versions for deterministic ties.
UpgradePlan reports stable add, remove, upgrade, and downgrade changes with the target Resolution.
The native CLI reads registry and lock files, then emits lock output, a text dependency graph, or Graphviz DOT.
Four example-driven CLI checks compare real file outputs byte for byte.
v0.3 is additive. Existing v0.1/v0.2 APIs for version parsing, requirement matching, resolution, lock output, dependency graphs, and conflict reports remain available.
Quick Verification
Default backend:
python scripts/check_contributor_identity.py --ref HEAD
moon info
moon fmt --check
moon check --deny-warn
moon test --deny-warn
moon run cmd/main --deny-warn
Native CLI path, on a machine with a C compiler:
moon check --target native --deny-warn
moon test --target native --deny-warn
sh scripts/demo-v0.3.sh
ConflictReport.package_name replaces the earlier package field so OSC2026 quality gates can run with --deny-warn and no reserved-keyword suppression. Formatted reports still print package: ... for stable CLI output.
File CLI
Registry rows use name version | dependency:requirement:
Use --strategy highest to generate a highest-compatible upgrade plan. --max-states must be positive; if the bound is exhausted, MoonDepSolve returns SearchLimitExceeded instead of pretending it found an optimum.
Mooncakes package: python123/moondepsolve version 0.3.1 is published. The release was validated with moon package, moon publish --dry-run, and moon publish.
MoonDepSolve
MoonDepSolve is a MoonBit library and native CLI for semantic versions, deterministic dependency resolution, lock output, dependency graphs, conflict reports, and exact upgrade planning.
site/index.htmlpython123/moondepsolvepython123 <python123@users.noreply.gitlink.org.cn>What It Solves
MoonBit ecosystem tools need a small, reviewable dependency core: parse versions, match version ranges, choose compatible package versions, explain conflicts, and write stable lock output. MoonDepSolve keeps that boundary narrow so it can be reused by package managers, build tools, dependency audits, and release automation.
v0.3 Highlights
HighestCompatiblechooses the highest compatible package set through the existing resolver.MinimalChangesearches bounded candidate states, first minimizing changed packages and then preferring higher versions for deterministic ties.UpgradePlanreports stable add, remove, upgrade, and downgrade changes with the targetResolution.v0.3 is additive. Existing v0.1/v0.2 APIs for version parsing, requirement matching, resolution, lock output, dependency graphs, and conflict reports remain available.
Quick Verification
Default backend:
Native CLI path, on a machine with a C compiler:
ConflictReport.package_namereplaces the earlierpackagefield so OSC2026 quality gates can run with--deny-warnand no reserved-keyword suppression. Formatted reports still printpackage: ...for stable CLI output.File CLI
Registry rows use
name version | dependency:requirement:Resolve and print a lock:
Plan from an existing lock:
Expected minimal-change output starts with:
Use
--strategy highestto generate a highest-compatible upgrade plan.--max-statesmust be positive; if the bound is exhausted, MoonDepSolve returnsSearchLimitExceededinstead of pretending it found an optimum.Library API
parse_version,format_version,compare_versionparse_req,matchesresolveparse_registry,format_lock,parse_lockformat_errorbuild_dependency_graph,format_graph_text,format_graph_dotbuild_conflict_report,format_conflict_reportdefault_upgrade_options,plan_upgrade,format_upgrade_plan,format_upgrade_errorExact signatures are tracked in
pkg.generated.mbti.Project Evidence
masterare kept at the same commit.docs/competition, including the one-page proposal PDF, demo script, release notes, and acceptance checklist.Mooncakes package:
python123/moondepsolveversion0.3.1is published. The release was validated withmoon package,moon publish --dry-run, andmoon publish.License
MoonDepSolve is released under the Apache License 2.0.