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
Primary config path different in Powershell and Bash #1023
Comments
Thanks for the bug report. This works as designed, so it would be helpful if you could describe what you expect. (This is why the bug report template has a section called "Expected behavior".) |
I would expect them to be the same. It is very confusing that the paths depend on the shell you're using. (Unless a But if it's expected behavior, feel free to close. |
It doesn't depend on the shell per se, only on the variables set in the environment that ccache is executed in. The bash environment (which I assume is bash from Git for Windows since you mentioned GitHub Actions) sets the
It's expected in the "it works as designed" sense, but the design could be improved. I personally don't use ccache in Windows and I don't have much knowledge on best practices when it comes to default locations for things in Windows. I agree that it sounds reasonable to unify the locations. However, I don't know to which one, and you didn't say which one you would prefer. The background is simply that checking |
This can be achieved by using I tested on my Windows 11 box and got: Git Bash:
Command Prompt:
There is also the I think people would be fine with |
I have no informed opinion on config/cache locations on Windows. Just a naïve user who realizes the paths are shell dependent when using GitHub Actions. The best suggestion I can make is to be inspired by how other cross-platform tools deal with this problem. |
Would
Sounds good, but I don't have time to investigate this. Input from others would be welcome here. |
TL;DR - I advocate for leaving things as they are, or rather will be after resolution of #946. I think there are two separate but related questions raised, the first in #946 and the second here.
|
Here are some other data points:
@mrjoel: If I understand correctly, the tools mentioned above use the same cache location in both execution environments. I'm leaning towards this for ccache as well since I think it makes sense. Not sure which location to prefer, though. @jonashaag: I noticed that you said that ccache "works only in Bash" when linking to this issue. I would argue that ccache already works in both environments, so maybe there is some aspect to this that I'm missing. Does ccache-action depend on the location being the same in bash and PowerShell? If we go with @mrjoel's suggestion of keeping the locations separate, would you still consider that ccache only works in bash? If so, why? |
I’m sure someone/we can get it to work. |
I'll try to work on implementing the design in #946 and followup there. |
1. Use sccache, because ccache isn't fully compatible with Windows yet. ccache/ccache#1023 2. Package Xbox One build correctly (all the `*.appx` files at archive root)
1. Use sccache, because ccache isn't fully compatible with Windows yet. ccache/ccache#1023 2. Package Xbox One build correctly (all the `*.appx` files at archive root)
1. Use sccache, because ccache isn't fully compatible with Windows yet. ccache/ccache#1023 2. Package Xbox One build correctly (all the `*.appx` files at archive root)
1. Use sccache, because ccache isn't fully compatible with Windows yet. ccache/ccache#1023 2. Package Xbox One build correctly (all the `*.appx` files at archive root)
1. Use sccache, because ccache isn't fully compatible with Windows yet. ccache/ccache#1023 2. Package Xbox One build correctly (all the `*.appx` files at archive root)
1. Use sccache, because ccache isn't fully compatible with Windows yet. ccache/ccache#1023 2. Package Xbox One build correctly (all the `*.appx` files at archive root)
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>
From using ccache 4.6 in a Windows GitHub Actions job:
In Powershell:
In Bash:
The text was updated successfully, but these errors were encountered: