Skip to content

Commit 74db04d

Browse files
committed
release: v0.5.2
1 parent 8ada4fa commit 74db04d

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .ziglint,
3-
.version = "0.5.1",
3+
.version = "0.5.2",
44
.fingerprint = 0x4b7deecc2ff046b7,
55
.paths = .{
66
"build.zig",

docs/releases/v0.5.2.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Performance Improvements
2+
3+
### Module graph construction is now 3000x faster! 🚀
4+
5+
Dramatically improved module graph build performance through two key optimizations:
6+
7+
**Before:** ~1850ms to analyze `build.zig` (loading 308 modules from std with ZIR)
8+
**After:** ~0.6ms to analyze `build.zig` (loading 2 modules without ZIR)
9+
10+
**What changed:**
11+
12+
1. **Disabled ZIR generation** - ZIR was added proactively in v0.4.0 for future control flow analysis (issue #18), but no rules currently use it. Generating ZIR took 10-50ms per module.
13+
14+
2. **Skip recursing into std library** - When linting user code like `build.zig`, we don't need to parse all 300+ modules from the standard library. Now we only load the root `std.zig` file.
15+
16+
**Impact on real-world usage:**
17+
18+
```bash
19+
# Linting a single file that imports std
20+
Before: ~2 seconds
21+
After: ~0.4 seconds (5x faster)
22+
23+
# Linting entire src/ directory
24+
Before: Previously slow on large projects
25+
After: Dramatically faster startup and analysis
26+
```
27+
28+
These optimizations can be easily reverted if control flow analysis is implemented in the future (see well-documented code comments in `src/ModuleGraph.zig`).
29+
30+
## Technical Details
31+
32+
- ZIR generation infrastructure remains in place and can be re-enabled by uncommenting documented code sections
33+
- Module graph now loads only user code + top-level std.zig instead of recursively parsing the entire standard library
34+
- All tests pass; linter functionality unchanged
35+
- Verified against GitHub history: ZIR added in commit 14bbe87 but never used by any rules
36+
37+
## Installation
38+
39+
```bash
40+
mise use github:rockorager/ziglint@v0.5.2
41+
```
42+
43+
Or download pre-built binaries from the release assets.

0 commit comments

Comments
 (0)