-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
Ensure tox-created directories contain CACHEDIR.TAG #3342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why create these in sub folders? Why not just created it within the .tox
root directory and be done with it?
With this implementation, the
.tox
directory itself won't contain the tag file, since there is no explicitmkdir
call for the workdir. Only the subdirectories explicitly created by calls around Tox will be populated with the file.
Just because there isn't does not mean we can't add it.
I felt there was an idea behind the decision to not have an explicit call to create that directory – maybe that the workdir wouldn't be eagerly created before it's needed (just to hold a subdirectory).
Sure, I'll do that. Would you prefer eagerly creating the workdir with the cache tag, or having the places that create those workdir subdirs ensure the workdir has the cache tag? |
Probably this 🤔 |
It turned out a little trickier like that, since an user could point Tox to a pre-created workdir, which we then certainly do not want to litter with a I still didn't write tests for this incarnation, just in case you'd like to take a review look first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI is fialing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs tests too 👍
@akx you still plan to finish this or should I close it? |
Yeah, it's still under construction – just been busy with work and figuring out how to best test-cover this. Rebased & added a commit that has some WIP tests :) |
No worries, but note the CI is still failing 😊 |
@akx friendly bump here 👍 |
This PR ensures that Tox-created work directories contain a
CACHEDIR.TAG
file, which can be used to exclude the directories from e.g. backups.Fixes #3334
tox -e fix
)docs/changelog
folder