13 repositories, 13 bugs: what open source taught me about my own tool
Описание и применение
Инструмент для генерации архитектурных диаграмм из репозиториев был улучшен после обнаружения 13 ошибок в 13 репозиториях. Исправления включали корректную обработку пакетов, вложенных типов, статических импортов, каталогов build, нестандартных путей в Rust и смешанных Kotlin/Java пространств имён. Теперь диаграммы точны, а неразрешённые ссылки сведены к минимуму.
Задача
A tool that generates architecture diagrams from source code must correctly resolve all references; otherwise it silently drops or misrepresents dependencies, leading to misleading diagrams.
Результат
The updated tool accurately resolves dependencies across Java, Kotlin, Go, Rust, JavaScript, TypeScript, and Python, producing diagrams with no unresolved references in most test cases.
Рабочий процесс
- 1. Run the tool against a repository using
npx mirofy-cli map . - 2. Inspect the generated HTML diagram for gaps and missing edges
- 3. Identify language‑specific resolution issues (e.g., package prefixes, nested types, static imports, build directories, non‑src crates, test crates, fun interfaces, snake‑case constants, mixed Kotlin/Java namespaces)
- 4. Update the resolver logic to handle each case correctly
- 5. Re‑run the tool and verify that gaps are reduced or eliminated
- 6. Repeat for additional repositories to ensure robustness
Доказательства
Across the thirteen repositories: 278,982 facts from 85,930 files. Four came out with zero unresolved references.
The rule the tool works by: Nothing is drawn that cannot be cited. Every edge in the output carries the file, the line and the commit that justifies it.
- Дата записи: 2026-09-07T06:53:28.201Z