From e22da060d78f1d3c43ea09680873b1940e81e3ea Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 3 Nov 2019 13:52:38 +0100 Subject: Store piPackages in sorted order Stack and Cabal are likely to have different orderings here. This has caused a difference in behaviour depending on the build-tool used downstream in HIE so for sanity's sake just sort the list. --- lib/Distribution/Helper.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Distribution') diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index 5df54b8..7448b2b 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -592,7 +592,7 @@ readProjInfo qe pc pcm pi = withVerbosity $ do return ProjInfo { piCabalVersion = makeDataVersion pjCabalLibVersion , piProjConfModTimes = pcm - , piPackages = pkgs + , piPackages = NonEmpty.sortWith pPackageName pkgs , piImpl = ProjInfoV2 { piV2Plan = plan , piV2PlanModTime = plan_mtime @@ -610,7 +610,7 @@ readProjInfo qe pc pcm pi = withVerbosity $ do return ProjInfo { piCabalVersion = cabalVer , piProjConfModTimes = pcm - , piPackages = pkgs + , piPackages = NonEmpty.sortWith pPackageName pkgs , piImpl = ProjInfoStack } -- cgit v1.2.3