mirror of https://github.com/Shizmob/smol
... actually make it deterministic
This commit is contained in:
parent
9f03bcf3a6
commit
2f535befa2
|
@ -7,8 +7,8 @@ from smolshared import *
|
||||||
def sort_imports(libraries, hashfn):
|
def sort_imports(libraries, hashfn):
|
||||||
#eprintf("in: " + str(libraries))
|
#eprintf("in: " + str(libraries))
|
||||||
|
|
||||||
# sort libs by name length
|
# sort libs by name length, then by name
|
||||||
ll = sorted(libraries.items(), key=lambda ls: len(ls[0]))
|
ll = sorted(libraries.items(), key=lambda ls: (len(ls[0]), ls[0]))
|
||||||
|
|
||||||
for i in range(len(ll)):
|
for i in range(len(ll)):
|
||||||
# sort symbols by hash value
|
# sort symbols by hash value
|
||||||
|
|
Loading…
Reference in New Issue