-
Notifications
You must be signed in to change notification settings - Fork 84
Feature/add source dir #309
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Git commit log doesn't follow the standard format, and it's not terribly informative. Please see https://github.com/frerich/clcache/wiki/Contributing#commit-logs for how to write commit logs - in particular, it would be great if you could explain the scenario in which this patch helps, how the behaviour is without the patch and how the behaviour is with the patch.
additionalData = "{}|{}|{}".format( | ||
compilerHash, commandLine, ManifestRepository.MANIFEST_FILE_FORMAT_VERSION) | ||
printTraceStatement("Hashing additionalData: {}".format(additionalData)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two printTraceStatement
statements seem unrelated to the commit - can you move them into a separate commit?
clcache.py
Outdated
return path.replace(baseDir, BASEDIR_REPLACEMENT, 1) | ||
if not sourceDir is None: | ||
assert sourceDir == os.path.normcase(sourceDir) | ||
if path.startswith(sourceDir): | ||
return path.replace(sourceDir, SOURCEDIR_REPLACEMENT, 1) | ||
return path | ||
return path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code uses an indentation of four spaces per level. Let's stick to that format (if you like, you can merge this commit into the previous commit while you're at it).
I'm not totally sure I understand the feature yet - can you please add some tests (e.g. to |
what's the difference between CLCACHE_BASEDIR and CLCACHE_SOURCEDIR? |
This modification adds a new base directory for source code that can be used to achieve path independence if your build and source are under different roots.