Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default local cache directory to .zig-cache instead of zig-cache #20077

Closed
andrewrk opened this issue May 26, 2024 · 4 comments · Fixed by #20115
Closed

default local cache directory to .zig-cache instead of zig-cache #20077

andrewrk opened this issue May 26, 2024 · 4 comments · Fixed by #20115
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented May 26, 2024

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.

@andrewrk andrewrk added this to the 0.13.0 milestone May 26, 2024
@thejoshwolfe

This comment was marked as resolved.

@AshishBhattarai
Copy link

AshishBhattarai commented May 27, 2024

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.

@par5er
Copy link

par5er commented May 27, 2024

Some points against this change:

  1. In frontend development, node_modules directory does not have leading . still everything works out
  2. Makes it slightly harder to clean all build artifacts as you can't do rm -rf zig-*

@ForeverZer0
Copy link

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.

andrewrk added a commit that referenced this issue May 29, 2024
@andrewrk andrewrk added the release notes This PR should be mentioned in the release notes. label May 29, 2024
weskoerber added a commit to weskoerber/known-folders that referenced this issue Jun 3, 2024
@andrewrk andrewrk removed the release notes This PR should be mentioned in the release notes. label Jun 6, 2024
ikskuh pushed a commit to ziglibs/known-folders that referenced this issue Jun 7, 2024
Rexicon226 pushed a commit to Rexicon226/zig that referenced this issue Jun 9, 2024
ryoppippi pushed a commit to ryoppippi/zig that referenced this issue Jul 5, 2024
aeryskyB added a commit to aeryskyB/build-your-own-redis that referenced this issue Jul 11, 2024
SammyJames pushed a commit to SammyJames/zig that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants