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

Feature: Add CACHEDIR.TAG to zig-cache #8210

Open
Ciantic opened this issue Mar 11, 2021 · 7 comments
Open

Feature: Add CACHEDIR.TAG to zig-cache #8210

Ciantic opened this issue Mar 11, 2021 · 7 comments
Labels
accepted This proposal is planned. enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@Ciantic
Copy link

Ciantic commented Mar 11, 2021

Consider adding CACHEDIR.TAG to zig-cache directory.

It's just text file with ASCII text at the beginning:

Signature: 8a477f597d28d172789f06886806bc55

(The hexadecimal string is same on all CACHEDIR.TAG files.)

For example Rust does this, and plenty other things, it makes easier for backup tools to ignore the directory.

@daurnimator daurnimator added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Mar 12, 2021
@daurnimator
Copy link
Contributor

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

@g-w1
Copy link
Contributor

g-w1 commented Mar 12, 2021

Cargo uses it.
image

@andrewrk andrewrk added accepted This proposal is planned. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Mar 12, 2021
@andrewrk andrewrk added this to the 0.9.0 milestone Mar 12, 2021
@mikdusan
Copy link
Member

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

from gnutar docs:

       --exclude-caches
              exclude contents of directories containing CACHEDIR.TAG, except for the tag file itself

       --exclude-caches-all
              exclude directories containing CACHEDIR.TAG

       --exclude-caches-under exclude everything under directories containing
              CACHEDIR.TAG

@Ciantic
Copy link
Author

Ciantic commented Mar 12, 2021

Kopia (my preferred backup tool at the moment) uses it by default

@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@perillo
Copy link
Contributor

perillo commented Mar 10, 2023

Do you have examples of tools that use CACHEDIR.TAG? this is the first I've heard of it.

Restic and fontconfig supports it. I also opened an issue for rsync.

@perillo
Copy link
Contributor

perillo commented Mar 10, 2023

What about adding CACHEDIR.TAG to the zig-out directory, too?

perillo added a commit to perillo/zig that referenced this issue Mar 10, 2023
Implement the http://www.brynosaurus.com/cachedir/ specification for the
Zig cache directory.

This change will make it easier to exclude Zig cached data from a backup,
expecially when the directory is not a well-known cache directory, like
~/.cache/zig or zig-cache.

Closes ziglang#8210
@dbrgn
Copy link

dbrgn commented Feb 15, 2025

Pika Backup also takes the CACHEDIR.tag file into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This proposal is planned. enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants