clcache icon indicating copy to clipboard operation
clcache copied to clipboard

Support CLCACHE_BASEDIR in nodirect mode

Open oktal3700 opened this issue 6 years ago • 4 comments

Do a simple case-insensitive find-and-replace to transform absolute paths into relative paths within the preprocessor output that is used to compute the hash. This makes CLCACHE_NODIRECT mode usable in the presence of the __FILE__ macro.

Fixes a bug in _normalizedCommandLine that caused the source filename to be included in the hash computation.

oktal3700 avatar Feb 21 '19 00:02 oktal3700

Not sure what caused the build to fail.

oktal3700 avatar Feb 21 '19 01:02 oktal3700

it also invalidates all existing cache entries for people who do not use the direct mode

Are you sure? Only computeKeyNodirect is affected. The bugfix part will invalidate cache entries for people who do not use BASEDIR though, is that what you meant?

oktal3700 avatar Feb 21 '19 13:02 oktal3700

Codecov Report

Merging #349 into master will increase coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #349      +/-   ##
==========================================
+ Coverage   88.93%   88.96%   +0.03%     
==========================================
  Files           4        4              
  Lines        1301     1305       +4     
  Branches      195      196       +1     
==========================================
+ Hits         1157     1161       +4     
  Misses        106      106              
  Partials       38       38
Flag Coverage Δ
#integrationtests_memcached 67.71% <100%> (+0.1%) :arrow_up:
#unittests 85.9% <100%> (+0.04%) :arrow_up:
Impacted Files Coverage Δ
clcache/__main__.py 90.9% <100%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cae73d8...863fdec. Read the comment docs.

codecov-io avatar Feb 21 '19 14:02 codecov-io

Applied suggested changes.

oktal3700 avatar Feb 21 '19 14:02 oktal3700