zig
zig copied to clipboard
default local cache directory to `.zig-cache` instead of `zig-cache`
This plays nicely with more tooling. For example, text editors will typically exclude this directory from "find in files" features. It communicates to new users of Zig that these files are ephemeral. I apologize for not getting this right the first time.
zig-out is unchanged.
and zig-out is unchanged, right?
Normally you would add zig-cache and zig-out to .gitignore (or any other vcs ignore file) and most editors automatically ignore anything in .gitignore, this change might not be necessary.
Some points against this change:
- In frontend development,
node_modulesdirectory does not have leading.still everything works out - Makes it slightly harder to clean all build artifacts as you can't do
rm -rf zig-*
I fully support this change, and it would definitely be a minor QoL improvement.
- Adding to
.gitignore, while widely supported by most editors, only works for projects that utilize a VCS. Sometimes one is just pumping out a throwaway script to accomplish a one-time task, and does not want to create a repo and configuration files just to navigate their files efficiently. - More importantly, it expresses intent better: with a few exceptions, a cache containing generated files that are of no relevance to a human are in a dot-directory. This change would make Zig compliant with that common convention.