Repository navigation
Releases
v0.4.14
What's new
- JS/TS gaps 5–10 (#27):
- TypeScript declaration merging.
- Types used only in type positions, and default parameter values, now count as uses of an import.
export { X }publishes X without using it.- A
catch {}inside an inline callback is now checked. - A package is used if package.json fields, script commands, tool configs or peers name it; root-hoisted workspace deps are accepted; Vite and Docusaurus aliases are no longer packages.
- Cyclomatic complexity is counted per function, as ESLint and radon do.
const f: Impl = ...annotations anddeclare moduleaugmentation are understood.
- Five more linker bugs found by the eval rerun:
- A static method call (
Store.get()) now uses its class, in Python and JS. - A namespace import handed on whole now uses every export.
- So does a dynamic
import()kept in a variable. - A comment inside
import()no longer hides it. import type {} from 'pkg'now uses the package.
- A static method call (
- Evaluation rerun (Python and JS/TS), same pinned corpus and tools, with fresh hand-checked samples:
- JS dead code only vibepiler reports (vs knip) went from 173 to 7, and all 7 are correct.
- Python's vibepiler-only dead pool went from 458 to 237; the remaining gaps W–Z are written up for the next round.
docs/eval/img/eval.pnghas been regenerated.
- CI: tests now run on every push and PR (Ubuntu with Python 3.12 and 3.13, macOS with 3.12), and the PyPI publish waits for them.
- Bootstrap round 11: this release's own new code was run through vibepiler and cleaned up; bloat 22.2%.
Full changelog: v0.4.13...v0.4.14
v0.4.13
What's new
- README and skills install from PyPI (#25):
uvx vibepiler,uv tool install vibepiler,pip install vibepiler, withvibepiler[semantic]for -O3. Images and doc links are absolute, so they render on the PyPI page. - The
compileandcleanupskills run the latest PyPI release instead of main.
Full changelog: v0.4.12...v0.4.13
v0.4.12
What's new
- On PyPI:
pip install vibepiler,uvx vibepiler,uv tool install vibepiler. Every GitHub release now uploads to PyPI through trusted publishing (#24). - Package metadata: project URLs, classifiers and keywords; the sdist dropped from 3.9 MB to 0.3 MB.
Full changelog: v0.4.11...v0.4.12
v0.4.11
What's new
- JS/TS linker gaps (#22): tsconfig
paths(withextendsand JSONC), workspace and self imports, packagemain/exportsand re-exports as public API, andbin/scripts/CI/config files as entry points. The 11 labelled false positives are gone and the labelled true positive stays; findings fell from 552 to 283 on excalidraw and from 76 to 30 on zustand. - Bootstrap round 10 (#23): a single-use helper that keeps its caller under the cognitive limit counts as a split, not as indirection. Across the 14 eval repos, single-use-helper findings fell from 204 to 166 and none were added. On vibepiler itself, removable lines at -O3 fell from 56 to 30; the bootstrap figure has been redrawn.
Full changelog: v0.4.10...v0.4.11
v0.4.10
Dead code: 12 of 13 known false positives fixed (gaps O–V, #21)
vibepiler now treats these as used:
- public methods of a class the package exports (
requests.Session.post) - what framework hooks call (Textual's
on_mount) unittest.TestCaseclasses in any file- Django database backends (
backends/<name>/base.py) and the overrides they reach - functions named in settings strings (
"pkg.processors.debug") - asv benchmarks in
benchmarks/ - functions given to registering decorators (
@app.template_filter(...),@handlers.append) - scripts whose top-level code is inside
try/except/else
On the evaluation corpus: django findings 4,068 → 3,580, flask 79 → 23, gpython 51 → 14, rich 83 → 64, httpx 11 → 1, with both labelled true positives still reported.
Semantic tier (#19)
- "Same job, different code" no longer pairs a function with the function it calls.
- Closures inside methods are skipped.
- The 100-pair cap is reported instead of cutting silently.
Cleanup round 9 (#20)
vibepiler on itself: -O2 bloat 10.6% → 8.6%, tangle 10.2% → 8.1%, functions over cognitive 30: 17 → 9. Findings are unchanged on all 14 evaluation repos.
v0.4.9
What changed
The Python evaluation, rerun on 0.4.8 with the same pinned corpus, tools and harness (#18). Analysis code is unchanged since 0.4.8.
- Since 0.4.5: dead definitions only vibepiler reports 985 → 458; unused imports ruff does not report 232 → 102; undeclared / unused dependencies 281 / 103 → 94 / 32; call sites linked 46–68% → 50–84%; output is still identical on every repeated run.
- Head-to-head on dead code where vibepiler and vulture disagree (fresh hand-checked sample): vibepiler is right on 2 of 15 (0 of 15 at 0.4.5), vulture on 5 of 13 decided. vulture is still ahead there.
- Gaps found (O–V), none from the typed linker: public methods of a public-API class, callees of framework hooks (Textual
on_mount),unittestclasses outsidetest_*files, Django backend.basemodules and dotted function strings in settings, asv benchmarks, registering decorators on nested defs, scripts whose top-level code is insidetry/else. Details in docs/eval/python/RESULTS.md. - Harness:
scripts/eval/python/run_all.shnow checks that every comparison tool is installed, not only vulture. - Version 0.4.9 (package and plugin).
v0.4.8
What changed
The typed linker: when the source states an object's class, calls on that object link to the class's method. (#17)
- Where the class comes from: parameter annotations (
db: Database,Optional[Database],"Database | None"); assignmentsdb = Database(), ordb = connect()whereconnectis annotated-> Database(-> Selfand awaited calls too); fields (self.db = db, class-bodydb: Database); property return types; module-level instances (client = Client()). - Not trusted: a name assigned two different classes, or reassigned by
for/with, holds no known class. A name the function assigns shadows a module-level name. - Safety: a call linked to a base-class method still reaches every override (virtual dispatch). Through a
Protocol, an ABC or a framework class, the method name still counts as used everywhere. - Numbers (eval corpus, pinned): share of call sites linked went from 46–68% to 50–84% (rich 68 → 84%, httpx 63 → 74%, requests 62 → 69%, flask 51 → 57%, django 46 → 50%, vibepiler 58 → 64%). 3 newly reported dead symbols, each checked by hand and real; none of the 15 labelled false positives returned. On vibepiler itself, the lines kept alive only because their name is used somewhere dropped from about 1,170 to 995.
- Not yet: method chains (
Q().where().all()),list[Foo], unions of two classes, TypeScript annotations, and the JS/TS linker gaps. - Version 0.4.8 (package and plugin).
v0.4.7
What changed
The Python fixes from the v0.4.6 evaluation. On the same pinned corpus, all 15 hand-checked dead-code findings that only vibepiler reported (all wrong in 0.4.5) are gone. (#16)
- Linker bugs A–N: bare
except Name:counts as a use; subscripted basesC(Base[T])are linked;import jsonno longer resolves to a project's ownjson/package (django's false 161-module cycle is gone);Sub.inherited()referencesSub; virtual dispatch reaches overrides at any depth; re-imported names, fallback defs undertry/except ImportError, and chainedimport *public API are handled. - Dependencies: pip-compile lock files are not manifests;
markdown-it-pymatchesmarkdown_it;httpcorewas skipped as a URL;cProfileis stdlib;test_requirements.txtis read, and manifests in one folder declare together. - Code run without a direct call: top-level scripts outside packages are entry points;
getattr(self, f"visit_{x}")dispatch; modules named in strings (compiler_module = "a.b", settings); Djangotemplatetags/andmanagement/commands/. - Escape analysis: methods of an object handed to a library are kept alive, in the unverified band.
- Numbers (8 repos): vibepiler-only dead definitions 985 → 454, vibepiler-only unused imports 232 → 102, undeclared dependencies 281 → 94, unused dependencies 103 → 32; django time unchanged (~35 s). Details in docs/eval/python/RESULTS.md.
- Not yet: JS/TS linker gaps; typed receivers from annotations (planned).
- Version 0.4.7 (package and plugin).
v0.4.6: evaluation against the standard tools
What changed
An evaluation of vibepiler against the tools people already use for each check, on pinned open-source repos. No analyzer changes in this release; the numbers are measured on 0.4.5.
- docs/eval/: reports for Python (vulture, deadcode, ruff, deptry, pylint, jscpd, radon, complexipy on 8 repos, 9k–410k lines), JS/TS (knip, ts-prune, ts-unused-exports, depcheck, jscpd, madge, ESLint + sonarjs on 6 repos) and the
-O3semantic tier (CodeNet Python800, GPTCloneBench type-4). - What holds up: identical output on every repeated run; faster than running the covered tools one after another on repos up to ~120k lines; cyclomatic matches radon on 99.9% of 31.5k functions, cognitive matches complexipy on 94%; import cycles match madge.
- What does not, yet: dead code where the tools disagree is mostly wrong on vibepiler's side (linker gaps, each listed with file:line and Python repros in
scripts/eval/python/repro/); django (410k lines) is slower than the toolchain. - Semantic tier: CodeRankEmbed int8 ties fp32 on quality (MAP@R 0.559 vs 0.580), runs 1.4× faster with half the memory and a 166 MB install instead of 912 MB; the mutual-nearest-neighbour rule raises precision 7.5×; structural clone tools find under 0.4% of same-task pairs where it finds 42%.
- Harnesses in
scripts/eval/rerun with one command each; work files go to.eval/(gitignored). Figure:uv run scripts/eval_figure.py. - README: the embedding model table now uses the evaluated numbers (the old "int8 is 2× faster" was 1.4×).
- Version 0.4.6 (package and plugin).
v0.4.5: vibepiler on itself, four analyzer bugs fixed
What changed
Compiling vibepiler with itself reported four things that were not true about the code. Each was a bug in the analyzer, now fixed test-first:
- Import cycles only count imports that run at import time. Imports inside a function or under
if TYPE_CHECKING:no longer close a cycle, which matches the tool's own advice for breaking one. pytest.importorskip("x")is an import, likeimportlib.import_module("x"), so a dependency your tests load that way is no longer "unused".- A package's public API is an entry point. Whatever a top-level Python package re-exports from its
__init__.py(narrowed by__all__) is no longer reported as dead or test-only. - Names in string annotations are used.
p: "Path"and-> "a.B | None"count as uses ofPathanda, so aTYPE_CHECKINGimport used only that way is no longer an unused import.
Also:
- The cleanup skill (
/vibepiler:cleanup) now separates intentional findings (suggest anacceptentry) from wrong ones (record a reproducing snippet and report it as a vibepiler bug, without hiding it). - The bootstrap figure and its README table go through round 8. Round 7 (v0.4.0) is measured with its own vibepiler. A dotted line marks where tangle switched to cognitive complexity. The four feature releases since v0.4.0 took bloat from 20% to 24%, and this round removed no code.
- Version 0.4.5 (package and plugin).