From 418c3b6d8aba2137c0cfbbd40c55d52f5bace17a Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Mon, 21 Dec 2015 10:56:44 +0100 Subject: [PATCH] stable order for modules in soar This is useful when you version the output of soar and want readable diffs. --- tools/soar.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/soar.lua b/tools/soar.lua index fe3d069..f87a2cd 100644 --- a/tools/soar.lua +++ b/tools/soar.lua @@ -148,7 +148,11 @@ function soar (lua, infile, manifest, outfile) function STANDALONE_LUA() end ]]) - for mod,filename in pairs(sources) do + local sorted_sources = {} + for mod in pairs(sources) do tinsert(sorted_sources, mod) end + table.sort(sorted_sources) + for _,mod in ipairs(sorted_sources) do + local filename = sources[mod] if type(filename) == 'string' then -- i.e. not explicitly excluded out:write("\n----------------- begin ", mod) if not hide_filenames then