-
Notifications
You must be signed in to change notification settings - Fork 473
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
Switch to using LOCALAPPDATA as default location on Windows #946
Comments
Sounds good to me. For reference, the use of
OK.
OK.
This is unfortunately not possible since ccache should not emit anything other than what the compiler would do. The options are either to silently use the new location or to print an error message and exit with an error code.
OK. |
Ah, yes indeed. Offhand I lean toward the side of exiting with an error, but will consider it further. While the error would be a breaking change on upgrade, combined with point four (continue using previous location of two don't exist) I think it'd be a) a very uncommon case, and b) alerting to a legitimately ambiguous situation, and c) alert to a situation of possibly large cache using disk space without serving any purpose. On the other hand, depending on build system etc. actually seeing the error message may be hit or miss, leading to undue confusion. |
@mrjoel: Are you still interested in working on this? |
Yes, although it's been back burnered for the last bit. If you're asking because someone else would like to do it before I get to it then that's completely fine. If you're asking whether it's worth keeping open then please do. |
I'll work on implementing this, I think this design is reasonable, and I also think a fatal error when a cache is detected in In addition, I will change the secondary/global config from We should also support a system-wide cache there in multi-user scenarios, @jrosdahl @Predelnik @cristianadam any suggestions on the best way to do that? Setting |
Thanks. Do I understand correctly that you're aiming for
That's OK with me.
Sounds good.
Yes, setting |
That's what I was going to do, and I think this makes the most sense. If someone wants UNIX semantics for config/cache they can use a cygwin/msys2/wsl ccache which is compiled that way. Most native UNIX ports do not make this kind of distinction in any case, it's confusing and error-prone. |
Throw a fatal error if a cache is detected in APPDATA. Set systemwide config to C:\ProgramData\ccache\ccache.conf . Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(std::string...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe behavior specific to Windows and cache directory finding heuristics on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe behavior specific to Windows and cache directory finding heuristics on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe behavior specific to Windows and cache directory finding heuristics on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe behavior specific to Windows and cache directory finding heuristics on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function PATH(...) to construct native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe behavior specific to Windows and cache directory finding heuristics on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function Util::make_path(...) to construct normalized native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe behavior specific to Windows and cache directory finding heuristics on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function Util::make_path(...) to construct normalized native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe and clarify configuration file finding behavior specific to Windows and cache directory finding behavior on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a variadic template helper function Util::make_path(...) to construct normalized native paths using std::filesystem. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf on Windows. Update manual to describe and clarify configuration file finding behavior specific to Windows and cache directory finding behavior on all systems. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Description
The current default on Windows of using
getenv("APPDATA")
results in the default location being in"${USERHOME}/AppData/Roaming"
. In many enterprise environments that is part of a Windows roaming profile, and is synchronized across a potentially slow network connection on login (i.e. during the login screen when no interaction is possible). The usage of this location by ccache has the unfortunate side-effect of synchronizing a large cache of binary data that is [mostly] inherently tied to a local machine (compiler versions, paths, etc.).Instead,
ccache
should default to using LOCALAPPDATA instead which is intended for use by application to store local-only data (email cache, browser cache, etc.).I'll try to draft a PR in the next week or so, with the following considerations in mind:
ccache.conf
in LOCALAPPDATA, then APPDATA. This provides a way to share config while allowing override on a per-machine basis. It also maps well to the existing configuration locations so no migration is required.LOCALAPPDATA/ccache
APPDATA/ccache
but is not explicitly configured for that location. The warning should include a recommendation to migrate/delete the cache location.APPDATA/ccache
as a default iff it exists but theLOCALAPPDATA/ccache
version does notThe text was updated successfully, but these errors were encountered: