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

Create CACHEDIR.TAG file in pixi directories #1904

Open
pavelzw opened this issue Aug 24, 2024 · 8 comments
Open

Create CACHEDIR.TAG file in pixi directories #1904

pavelzw opened this issue Aug 24, 2024 · 8 comments
Labels
✨ enhancement Feature request

Comments

@pavelzw
Copy link
Contributor

pavelzw commented Aug 24, 2024

Problem description

IMO all .pixi directories should be considered ephemeral (and rattler's cache directories as well) and it doesn't make sense to back them up. For this, some programs (like ruff, pytest, ...) create a CACHEDIR.TAG file as described in https://bford.info/cachedir/.
How about pixi also creates such a file in .pixi/envs?

@pavelzw pavelzw added the ✨ enhancement Feature request label Aug 24, 2024
@I-Al-Istannen
Copy link

Pixi already (indirectly) depends on cachedir:

pixi/Cargo.lock

Line 684 in 6c1926b

name = "cachedir"

So I wasn't quite sure if that is Intentional. It increased my backup size by a few hundred MBs of mostly useless files though, so I would be in favor of marking it as cache. My backup tooling understands the cachedir spec.

@baszalmstra
Copy link
Contributor

Sounds like a good idea! Should we add it to the .pixi directory or just the env subdirectory?

@pavelzw
Copy link
Contributor Author

pavelzw commented Aug 24, 2024

Maybe in line with .gitignore the whole .pixi directory?

Although some people might want to persist .pixi/config.toml in their backups 🤔 (not sure how widely this feature is used though)

@vigneshmanick
Copy link
Contributor

i am one of those use the .pixi/config.toml as an exception in the .gitignore. :)

imo. only the envs folder should be in the .gitignore and this gives more flexiblity in future for adding/removing data from the .pixi folder . E.g if a global manifest that is project specific can be placed here.

@pavelzw
Copy link
Contributor Author

pavelzw commented Aug 24, 2024

imo only the envs folder should be in the .gitignore

#1488 (comment)

@ruben-arts
Copy link
Contributor

The .pixi folder can contain much more folders than just envs, only the config.toml could make sense to be added to git. So I still wouldn't only add the envs folder.

@vigneshmanick, what do you put in the config.toml that you add to multiple projects?

@vigneshmanick
Copy link
Contributor

nothing specific to multiple projects, mostly it's these following

change-ps1
pinning-strategy
pypi-config

@tdejager
Copy link
Contributor

The .pixi folder can contain much more folders than just envs, only the config.toml could make sense to be added to git. So I still wouldn't only add the envs folder.

@vigneshmanick, what do you put in the config.toml that you add to multiple projects?

Should we then maybe break currents standards by moving the config.toml to a seperate config folder, and exclude that folder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

6 participants