aboutsummaryrefslogtreecommitdiff
path: root/lib/Distribution
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-11-03 13:52:38 +0100
committerDaniel Gröber <dxld@darkboxed.org>2019-11-03 13:57:28 +0100
commite22da060d78f1d3c43ea09680873b1940e81e3ea (patch)
tree5dfb53172d9fc65ebea10cdd141b58256cad1a2b /lib/Distribution
parenta1c4a3746311055c2100471aeb98606345496eb3 (diff)
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.
Diffstat (limited to 'lib/Distribution')
-rw-r--r--lib/Distribution/Helper.hs4
1 files changed, 2 insertions, 2 deletions
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
}