From: Christian Van Wambeke Date: Mon, 12 Jul 2021 09:24:12 +0000 (+0200) Subject: sorted sat log and fix wambeke as not debug mode X-Git-Tag: V9_9_0~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcvw%2Fjuil21;p=tools%2Fsat.git sorted sat log and fix wambeke as not debug mode --- diff --git a/commands/compile.py b/commands/compile.py index 984363c..252206d 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -104,16 +104,22 @@ def find_path_graph(graph, start, end, path=[]): def depth_first_topo_graph(graph, start, visited=[], sorted_nodes=[]): visited = visited + [start] if start not in graph: - raise src.SatException('Error in product dependencies : %s product is referenced in products dependencies but is not present in the application !' % start) + # get more explicit error + where = [k for k in graph if start in graph[k]] + raise src.SatException('Error in product dependencies : %s product is referenced in products dependencies, but is not present in the application, from %s' % (start, where)) + # may be in debug mode, continue loop to get all problems, (if comment raise) + # print("WARNING : %s product is referenced in products dependencies but is not present in the application, from %s" % (start, where)) + # sorted_nodes = sorted_nodes + [start] + # return visited, sorted_nodes for node in graph[start]: if node not in visited: visited,sorted_nodes=depth_first_topo_graph(graph, node, visited,sorted_nodes) else: if node not in sorted_nodes: - raise src.SatException('Error in product dependencies : cycle detection for node %s and %s !' % (start,node)) + raise src.SatException('Error in product dependencies : cycle detection for node %s and %s' % (start,node)) sorted_nodes = sorted_nodes + [start] - return visited,sorted_nodes + return visited, sorted_nodes # check for p_name that all dependencies are installed diff --git a/commands/log.py b/commands/log.py index d42fda0..e2c1902 100644 --- a/commands/log.py +++ b/commands/log.py @@ -112,6 +112,7 @@ def print_log_command_in_terminal(filePath, logger): def show_last_logs(logger, config, log_dirs): """Show last compilation logs""" log_dir = os.path.join(config.APPLICATION.workdir, 'LOGS') + sorted_log_dirs = sorted(log_dirs) # list the logs nb = len(log_dirs) nb_cols = 4 @@ -120,7 +121,7 @@ def show_last_logs(logger, config, log_dirs): for i in range(0, nb_cols): k = index + i * col_size if k < nb: - l = log_dirs[k] + l = sorted_log_dirs[k] str_indice = src.printcolors.printcLabel("%2d" % (k+1)) log_name = l logger.write("%s: %-30s" % (str_indice, log_name), 1, False) @@ -131,7 +132,7 @@ def show_last_logs(logger, config, log_dirs): while (x < 0): x = ask_value(nb) if x > 0: - product_log_dir = os.path.join(log_dir, log_dirs[x-1]) + product_log_dir = os.path.join(log_dir, sorted_log_dirs[x-1]) show_product_last_logs(logger, config, product_log_dir) def show_product_last_logs(logger, config, product_log_dir): diff --git a/src/debug.py b/src/debug.py index 30d6ea7..1fbdcd4 100755 --- a/src/debug.py +++ b/src/debug.py @@ -73,7 +73,7 @@ except ImportError: _debug = [False] #support push/pop for temporary activate debug outputs # wambeke is christian at home -_developers = ["christian", "wambeke"] +_developers = ["xchristian", "xwambeke"] def isDeveloper():