From c92c7a595ee7e8a19f30bc1cb37451a9208538e3 Mon Sep 17 00:00:00 2001 From: Tom van Dijck Date: Mon, 19 Jun 2017 13:44:54 -0700 Subject: [PATCH] Improve determinism in sln output. --- modules/vstudio/tests/sln2005/test_projects.lua | 4 ++-- modules/xcode/tests/test_xcode4_workspace.lua | 6 +++--- src/base/workspace.lua | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/vstudio/tests/sln2005/test_projects.lua b/modules/vstudio/tests/sln2005/test_projects.lua index 1ce5cae2..04eaeca8 100644 --- a/modules/vstudio/tests/sln2005/test_projects.lua +++ b/modules/vstudio/tests/sln2005/test_projects.lua @@ -146,11 +146,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{2FCAF67E-9B3 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject2", "MyProject2.vcproj", "{B45D52A2-A015-94EF-091D-6D4BF5F32EE0}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{68E9C25D-54A1-04AB-BDA8-DD06A97F9F9B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject3", "MyProject3.vcproj", "{B55D52A2-A115-94EF-0A1D-6D4BF6F32EE0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" EndProject ]] end diff --git a/modules/xcode/tests/test_xcode4_workspace.lua b/modules/xcode/tests/test_xcode4_workspace.lua index 77336c10..795f1e6c 100644 --- a/modules/xcode/tests/test_xcode4_workspace.lua +++ b/modules/xcode/tests/test_xcode4_workspace.lua @@ -84,9 +84,6 @@ - - @@ -94,6 +91,9 @@ location = "group:MyProject2.xcodeproj"> + + ]] end diff --git a/src/base/workspace.lua b/src/base/workspace.lua index a150f370..22b268f2 100644 --- a/src/base/workspace.lua +++ b/src/base/workspace.lua @@ -129,6 +129,11 @@ end }) + -- sort by uuid for determinism. + p.tree.sort(tr, function(a,b) + return a.name < b.name + end) + self.grouptree = tr return tr end