aboutsummaryrefslogtreecommitdiff
path: root/lib/Distribution/Helper.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-05-27 15:05:20 +0200
committerDaniel Gröber <dxld@darkboxed.org>2019-05-27 15:06:40 +0200
commit0b7de90484163ee3d15fa52831ee2944d79cc5e0 (patch)
tree3584414fcbeb610094d7fa4e6860ae8534282d26 /lib/Distribution/Helper.hs
parent5824410f0d50d41d55fecfa339780389adda185a (diff)
Revert compilerVersion being project-scope
Turns out the Setup header has the compiler version used to build Setup, not the version the project is configured to use.
Diffstat (limited to 'lib/Distribution/Helper.hs')
-rw-r--r--lib/Distribution/Helper.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs
index 167db45..1505063 100644
--- a/lib/Distribution/Helper.hs
+++ b/lib/Distribution/Helper.hs
@@ -279,14 +279,9 @@ compilerVersion = Query $ \qe ->
-- ^ ASSUMPTION: Here we assume the compiler version is uniform across all
-- units so we just pick any one.
case piImpl proj_info of
- ProjInfoV1 { piV1SetupHeader=UnitHeader{..} } ->
- return $ first BS8.unpack $ uhCompilerId
- -- ^ The package name here is restricted to Latin-1 because of the way
- -- Cabal writes the header. Shouldn't matter too much V1 is legacy
- -- anyways and GHC and it's glorious ASCII name rule the Haskell world.
+ ProjInfoV1 {} -> uiCompilerId <$> getUnitInfo qe someUnit
ProjInfoV2 { piV2CompilerId } -> return piV2CompilerId
ProjInfoStack {} -> uiCompilerId <$> getUnitInfo qe someUnit
- -- ^ TODO: Any way to get this faster for stack?
-- | All local units currently active in a project\'s build plan.
projectUnits :: Query pt (NonEmpty (Unit pt))