-
Notifications
You must be signed in to change notification settings - Fork 83
Add support for loading config from a clcache.conf file #320
base: master
Are you sure you want to change the base?
Add support for loading config from a clcache.conf file #320
Conversation
There seems to be an issue with continuous-integration builds:
But it doesn't seem like in scope of this PR, so I didn't try to fix it, sorry. I could still run tests manually though and they all pass. Also, another thing to add to compliment the above would be to add CLCACHE_MAX_SIZE to settings / Environment config: just so that different CLCACHEs don't really require having to call 'clcache -M'. And another nice (and really easy) thing to add would be suffixes. CCACHE allows for something like:
Hope you like the change and will pull it, I'm sure it'll be useful. |
Oh, and another useful thing would be for tests to override CLCACHE_CL with some 'dummy (mock)' 'cl.exe' (e.g. a python script) - so that one could run tests without having VisualStudio compiler suite installed. It'd allow for maybe faster / cleaner test execution. |
I have another idea for a suggestion (if you don't mind, sorry for spamming). The 'Integration' part of Wiki (https://github.com/frerich/clcache/wiki/Integration) |
b2486d5
to
89c7c61
Compare
👍 Good suggestions |
I think your suggestions sound really good, but unfortunately I have to admit that I didn't get around to maintaining this project as much as I'd like to; I only just returned from my summer vacation and on my desk there's a pile of other tasks to work on unfortunately - only little time left for 'recreational programming' in my spare time. Furthemore, I stopped using clcache myself a couple of months ago, the remaining C++ project I'm involved with (using a proprietary build system) doesn't really benefit from it anymore. Hence, I wonder: what would be a good way to contact users/contributors to the project and invite others to step forward and take over maintainership? There are a number of users of this tool in various projects and I feel it's still very worthwhile to continue putting work into clcache, e.g. by implementing improvements such as the one you describe. |
Understood, no worries - I think it's in a good state, and it seems to work for me :) I had the same with some of my pet projects: it's not easy to keep up with out-of-work stuff in one's spare time. But it's still worth it - as if not people who do this, there'd be no useful software for those who need & use it :)
I'm not sure. But I think maybe mentioning this on a Wiki / README page in form of 'new maintainers needed' or something? There are many people who often ask on various forums/groups how they could get into open-source. They usually get generic (and not very useful) replies like: 'Find something on github/sourceforge and try contributing / fixing some issue etc'. This project already has a fair and friendly invite for contributions IMO.
Agreed! 👍 Myself including, I've recently picked up clcache - thanks for creating it! (I'm really a Linux person, but I need MSVC tools and would like to use tools like this one whenever possible). I've been using CCACHE, icecc/icecream for years and I think they're great. They fill out an important gap in the toolchain (IMO compilers could really offer this out of the box..maybe someday?). Anyway, I don't want to volunteer that much as I can't promise too much regarding time to maintain it, but I don't mind from time to time having a look / code-review or something? I for sure won't mind providing features that I think are needed / helpful to make it more useful (and I'll try to do it keeping high quality standards, as required) so they hopefully could be merged. I think the most important thing would be to fix the continuous integration as this is really a first source of truth on sanity of proposed changes ;) |
4751ac8
to
2cc04bb
Compare
9733cdd
to
b05cf8c
Compare
Codecov Report
@@ Coverage Diff @@
## master #320 +/- ##
==========================================
+ Coverage 88.23% 88.32% +0.09%
==========================================
Files 4 4
Lines 1275 1302 +27
Branches 190 196 +6
==========================================
+ Hits 1125 1150 +25
- Misses 111 112 +1
- Partials 39 40 +1
Continue to review full report at Codecov.
|
b05cf8c
to
15cfa30
Compare
15cfa30
to
ceed29f
Compare
This is useful and the GCC version of ccache also implements a similar concept. It might be useful in situations where some default settings could be specified or when environment is not passed correctly down to the compiler chain. This change introduces support for clcache.conf file to allow clcache to read settings from there. The precedence is as follows: 1. If present, Environment variable(s) are used, or 2. [current_working_dir]\clcache.conf is loaded, or, if not found 3. [%HOME% or ~\].clcache\clcache.conf is be loaded, or if not found 4. [%ALLUSERSPROFILE% or C:\Users\].clcache\clcache.conf is loaded. In each case, once a clcache.conf file is found, no other conf file is considered and values only from this file are used. It is also loaded only once (and all its values then cached) - all to avoid unnecessary performance penalties.
ceed29f
to
40b5736
Compare
This is useful and the GCC version of ccache also implements a similar concept.
It might be useful in situations where some default settings could be
specified or when environment is not passed correctly down to the compiler
chain.
This change introduces support for clcache.conf file to allow clcache
to read settings from there.
The precedence is as follows:
In each case, once a clcache.conf file is found, no other conf file is
considered and values only from this file are used. It is also loaded
only once (and all its values then cached) - all to avoid unnecessary
performance penalties.
(relevant tests were also added)