-
Notifications
You must be signed in to change notification settings - Fork 368
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
chore(Cache): Add support for $MATHLIB_CACHE_DIR #21480
base: master
Are you sure you want to change the base?
Conversation
This allows someone to explicitly put just Mathlib's own cache in some specific location without needing to entirely affect any program using XDG_CACHE_HOME. When unset we fallback to the same logic as before.
2016bb3
to
c89a963
Compare
PR summary c89a9635c1Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit> The doc-module for No changes to technical debt.You can run this locally as
|
What happens if, by mistake, |
My immediate reaction is that while I think it is very common for programs to have both a program-specific envvar and also to then fallback to XDG (see my giant list here of just programs I use...), I don't know of any which have that which perform the check you mention. I'm not saying it's not possible someone doing it is making a mistake, but I guess it feels weird to check for to me for reasons I can't quite articulate -- usually for this sort of thing I think you "trust" that someone setting an envvar has double checked and really means to do what they're trying to do (and so it'd be odd to prevent them from doing it in the program if in theory it's possible they mean what they say). I'm happy to add it though if you'd like, I don't think anyone really will ever be negatively affected by it in practice. |
I had no idea that there even was a notion of an |
Yeah, XDG is a (Linux) specification for directory hierarchies which lives here: https://specifications.freedesktop.org/basedir-spec/latest/ and which is followed by lots of programs on your computer. |
This allows someone to explicitly put just Mathlib's own cache in some specific location without needing to entirely affect any program using XDG_CACHE_HOME.
When unset we fallback to the same logic as before.