diff options
author | Lukacs Berki <lberki@google.com> | 2015-06-29 07:48:59 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-06-29 16:39:38 +0000 |
commit | cf49294141665da4f4d005610c816fc591c08c22 (patch) | |
tree | 91d6c466f5b2c5c0c74fd1db66ca63ec82ae4a22 /src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java | |
parent | 4313d37941a4c8196af112e9bf3b22d6c366d3cc (diff) |
Remove BuildConfiguration.cacheKey() and replace .shortCacheKey() with a .checksum() method that is computed from the checksum of the build options. Also remove Fragment.cacheKey() and Fragment.getName().
The reasoning is that within a single build, if two BuildConfigurations share the same BuildOptions, they must be the same because BuildConfiguration can only be a function of BuildOptions, specific targets (which stay the same during a build) and BlazeDirectories (which stay the same during the lifetime of a server). Between different builds if the configurations are recreated, they will always be considered different because Java reference equality (==) is used for comparing BuildConfigurations.
Also remove "Serializable" tags from configuration-related things.
--
MOS_MIGRATED_REVID=97107881
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java index 3f26c59090..246c2c6b58 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PythonConfiguration.java @@ -29,11 +29,6 @@ public class PythonConfiguration extends BuildConfiguration.Fragment { this.defaultPythonVersion = pythonVersion; } - @Override - public String getName() { - return "Python"; - } - /** * Returns the Python version (PY2 or PY3) this configuration uses. */ @@ -52,11 +47,6 @@ public class PythonConfiguration extends BuildConfiguration.Fragment { } @Override - public String cacheKey() { - return defaultPythonVersion.toString(); - } - - @Override public String getOutputDirectoryName() { return (defaultPythonVersion == PythonVersion.PY3) ? "py3" : null; } |