Skip to content

feat: use the XDG Base Directory Specification for the cache folder #336

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaravrav
Copy link

Uses XDG_CACHE_HOME/cmake-js instead of ~/.cmake-js.

I yet haven't added functionality to migrate the old cache to the new cache path since I am not sure if the maintainers would like to do that.

Uses `XDG_CACHE_HOME/cmake-js` instead of `~/.cmake-js`
@aaravrav
Copy link
Author

@unbornchikken

@Julusian Julusian added this to the v8.0.0 milestone Apr 20, 2025
@Julusian
Copy link
Collaborator

I think that changing this shouldn't be done before 8.0.0, as this will likely break things for some users.
So this will likely be waiting a little while until there is enough to justify 8.0

@aaravrav
Copy link
Author

as this will likely break things for some users

That can avoided by moving ~/.cmake-js to XDG_CACHE_HOME if it exists

@Julusian
Copy link
Collaborator

I wish it were that simple.

What if the new folder already exists? Should we try to merge it?
Any CI workflows caching the .cmake-js directory would stop working and would now be caching an empty path.
What if the source/destination folder is readonly? If someone is running on an offline system because everything is carefully audited, I wouldn't be surprised to see them readonly.
There are almost certainly scenarios I haven't thought of too

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 this pull request may close these issues.

2 participants