News for hackers. Stuff that matters.
Re:Zig – Type Resolution Redesign and Language Changes by h4ch1 on Wednesday March 11, 2026 @01:19AM (#47331955)
But why is it so big in the first place?

I was searching around for causes and came across the following issues: https://github.com/ziglang/zig/issues/15358 which was moved to https://codeberg.org/ziglang/zig/issues/30193

The following quotes stand out

> zig's caching system is designed explicitly so that garbage collection could happen in one process simultaneously while the cache is being used by another process.

> I just ran WizTree to find out why my disk was full, and the zig cache for one project alone was like 140 GB.

> not only the .zig-cache directory in my projects, but the global zig cache directory which is caching various dependencies: I'm finding each week I have to clear both caches to prevent run-away disk space

Like what's going on? This doesn't seem normal at all. I also read somewhere that zig stores every version of your binary as well? Can you shed some light on why it works like this in zigland?

Re:Zig – Type Resolution Redesign and Language Changes by Cloudef on Wednesday March 11, 2026 @01:25AM (#47331984)
AFAIK garbage collection is basically not implemented yet. I myself do `ZIG_LOCAL_CACHE_DIR=~/.cache/zig` so I only have to nuke single directory whenever I feel like it.
Re:Zig – Type Resolution Redesign and Language Changes by divan on Wednesday March 11, 2026 @05:27AM (#47333414)
what exactly people call 'garbage collection' in Zig? build cache cleanup?
Re:Zig – Type Resolution Redesign and Language Changes by Cloudef on Wednesday March 11, 2026 @05:40AM (#47333502)
Indeed what was referred to here is the zig build system cache.