This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch tristan/debug-cache-keys
in repository https://gitbox.apache.org/repos/asf/buildstream.git
The following commit(s) were added to refs/heads/tristan/debug-cache-keys by
this push:
new fbfa350f1 PONY
fbfa350f1 is described below
commit fbfa350f17b12822a7812e1bea440c2afefc7e1c
Author: Tristan van Berkom <[email protected]>
AuthorDate: Sat Dec 3 16:52:47 2022 +0900
PONY
---
src/buildstream/_cachekey.py | 4 ----
src/buildstream/_variables.pyx | 8 ++++++++
src/buildstream/buildelement.py | 7 +------
src/buildstream/element.py | 2 +-
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/buildstream/_cachekey.py b/src/buildstream/_cachekey.py
index 4f21bbbba..2a3b7f2ef 100644
--- a/src/buildstream/_cachekey.py
+++ b/src/buildstream/_cachekey.py
@@ -60,8 +60,4 @@ def is_key(key):
#
def generate_key(value):
ustring = ujson.dumps(value, sort_keys=True,
escape_forward_slashes=False).encode("utf-8")
-
- import sys
- sys.stderr.write("\n\nJSON STRING: {}\n\n".format(ustring))
-
return hashlib.sha256(ustring).hexdigest()
diff --git a/src/buildstream/_variables.pyx b/src/buildstream/_variables.pyx
index b26bfa24a..264318678 100644
--- a/src/buildstream/_variables.pyx
+++ b/src/buildstream/_variables.pyx
@@ -19,6 +19,7 @@
import re
import sys
import itertools
+import sys
from ._exceptions import LoadError
from .exceptions import LoadErrorReason
@@ -371,11 +372,18 @@ cdef class Variables:
cdef list value_expression
value_expression = <list> self._values[name]
+
+ if name == "make":
+ sys.stderr.write("\n\nEXPAND make variable with values:
'{}'\n".format(value_expression))
+
if len(value_expression) > 1:
sub = self._fast_expand_value_expression(value_expression, counter)
value_expression = [sys.intern(sub)]
self._values[name] = value_expression
+ if name == "make":
+ sys.stderr.write("\n\nEXPANDED make variable:
'{}'\n".format(value_expression[0]))
+
return <str> value_expression[0]
# _fast_expand_value_expression()
diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py
index 2c6ed1656..40355f5cf 100644
--- a/src/buildstream/buildelement.py
+++ b/src/buildstream/buildelement.py
@@ -214,10 +214,7 @@ class BuildElement(Element):
self._command_subdir = self.get_variable("command-subdir") # pylint:
disable=attribute-defined-outside-init
for command_name in _command_steps:
- command_list = node.get_str_list(command_name, [])
- self.__commands[command_name] = command_list
- import sys
- sys.stderr.write("\n\nLOAD COMMAND NAME: '{}'\nLOAD COMMAND LIST:
'{}'\n".format(command_name, command_list))
+ self.__commands[command_name] = node.get_str_list(command_name, [])
def configure_dependencies(self, dependencies):
@@ -248,8 +245,6 @@ class BuildElement(Element):
dictionary = {}
for command_name, command_list in self.__commands.items():
- import sys
- sys.stderr.write("\n\nCOMMAND KEY: '{}'\nCOMMAND LIST:
'{}'\n".format(command_name, command_list))
dictionary[command_name] = command_list
if self._command_subdir:
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 7a3f06c7c..3824e45bb 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -2864,7 +2864,7 @@ class Element(Plugin):
self.__variables.expand(self.__config)
if "build-commands" in self.__config:
- sys.stderr.write("\n\nVARS SUBSTITUTED build-commands:
'{}'\n".format(self.__config.get_str_list("build-commands")))
+ sys.stderr.write("VARS SUBSTITUTED build-commands:
'{}'\n".format(self.__config.get_str_list("build-commands")))
self._configure(self.__config)