diff --git a/src/python/jw/pkg/cmds/projects/CmdBuild.py b/src/python/jw/pkg/cmds/projects/CmdBuild.py index 09f71122..3a29b899 100644 --- a/src/python/jw/pkg/cmds/projects/CmdBuild.py +++ b/src/python/jw/pkg/cmds/projects/CmdBuild.py @@ -162,15 +162,16 @@ class CmdBuild(Cmd): # export log(DEBUG, f'--- Adding dependency tree of module "{m}"') add_dep_tree(m, dep_flavours, dep_tree, all_deps) while len(all_deps): - # Find any leaf - for d in all_deps: + # Find any leaf, deterministically: sorted, so that the + # order is reproducible across runs + for d in sorted(all_deps): # Dependency d doesn't have dependencies itself if not len(dep_tree[d]): break # found else: # no Leaf found raise Exception( 'Fatal: Dependencies between these modules are unresolvable: ' - ', '.join(all_deps) + ', '.join(sorted(all_deps)) ) order.append(d) # do it # bookkeep it