惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
B
Blog RSS Feed
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
L
LangChain Blog
IT之家
IT之家
F
Fortinet All Blogs
V
V2EX
C
Check Point Blog
The Cloudflare Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I built a self‑healing package manager
Nersissiian · 2026-04-28 · via DEV Community

Nersissiian

How I Built a Self-Healing Package Manager from Scratch (Rust + AI)

The first tool that automatically resolves dependency conflicts by generating adapter code — and retries with AI until the build passes.


HealDep banner


The Problem: Dependency Hell is Real

Every developer has been there. You're building a Rust project, and suddenly:

  • Crate A requires tokio 0.2
  • Crate B requires tokio 1.0

Cargo throws an error, and your build fails. The same happens in Python (click==7.0 vs click==8.0) and in npm (lodash version mismatches). The only "solutions" are to fork one of the libraries, pin an old version forever, or manually write glue code.

I wanted to see if this could be automated away completely.


The Idea: A Package Manager That Heals Itself

What if a tool could:

  1. Detect the conflict automatically
  2. Generate an adapter shim that bridges the two versions
  3. Test the adapter in a sandbox
  4. If it fails, retry with AI-powered code generation

That's how HealDep was born.


Architecture Overview

HealDep consists of several Rust crates and a Python web dashboard:

Component Description
healdep (CLI) Main binary – parses manifests, controls the healing pipeline
healdep-synthesizer Generates shim crates/packages
healdep-sandbox Builds and tests the generated adapter in isolation
healdep-registry Caches and shares successfully generated shims
Python server Web dashboard with healing history and REST API

HealDep dashboard


How the Healing Works (Step-by-Step)

1. Parsing Manifests

HealDep reads Cargo.toml, requirements.txt, and package.json. For Rust, it uses the cargo_metadata crate to get the full resolved dependency graph. For Python and npm, it has custom parsers that extract version constraints with regular expressions.

2. Detecting the Conflict

The tool iterates over all packages. If the same crate appears with two different required versions, that's flagged as a conflict:

// Simplified detection logic
for (name, versions) in name_to_versions {
    let unique: HashSet<_> = versions.iter().collect();
    if unique.len() > 1 {
        conflicts.push(Conflict { crate_name: name, versions });
    }
}

## Docker & CI/CD

HealDep is available as a Docker image:

Enter fullscreen mode Exit fullscreen mode


bash
docker pull ghcr.io/nersisiian/healdep:v0.1.0
docker run -p 5000:5000 ghcr.io/nersisiian/healdep:v0.1.0

It also includes GitHub Actions workflows:

  • ci.yml – lint, test, build, and publish the Docker image
  • healdep-action.yml – automatically heal dependencies on every push
  • dependabot-heal.yml – heal PRs opened by Dependabot

Docker up

Lessons Learned

  1. Dependency graphs are complex – optional features, platform-specific deps, and lock files make this harder than it looks.
  2. AI is a powerful assistant, not a silver bullet – it works well for mechanical translations, but complex logic is still beyond reach.
  3. Sandboxing is essential – never modify the user's project directly. Always test the shim in isolation first.
  4. Multi-language support taught me a lot about the differences (and similarities) between Cargo, pip, and npm.

Try It Yourself

HealDep is 100% open-source (MIT licensed).


bash
git clone https://github.com/Nersisiian/HealDep.git
cd healdep
cargo build --release
./target/release/healdep heal examples/demo_app/Cargo.toml --ai

If you like it, give it a ⭐ on GitHub — it means the world to a solo developer.

- **GitHub**: [https://github.com/Nersisiian/HealDep](https://github.com/Nersisiian/HealDep)
- **Product Hunt**: [https://www.producthunt.com/posts/healdep](https://www.producthunt.com/posts/healdep)

---

## What's Next?

I'm planning to add support for Java (Maven/Gradle) and Go. If you have ideas or want to contribute, open an issue or join the discussion!

**Thank you for reading, and may your builds never fail again.** 🩺

Enter fullscreen mode Exit fullscreen mode