@@ -60,7 +60,8 @@ import Stack.Types.CompilerPaths
6060 ( CompilerPaths (.. ), HasCompiler (.. ) )
6161import Stack.Types.Config ( Config (.. ), HasConfig (.. ), stackRootL )
6262import Stack.Types.ConfigureOpts
63- ( BaseConfigOpts (.. ), ConfigureOpts (.. ), configureOpts )
63+ ( BaseConfigOpts (.. ), ConfigureOpts (.. ) )
64+ import qualified Stack.Types.ConfigureOpts as ConfigureOpts
6465import Stack.Types.Curator ( Curator (.. ) )
6566import Stack.Types.Dependency ( DepValue (.. ), isDepTypeLibrary )
6667import Stack.Types.DumpPackage ( DumpPackage (.. ), dpParentLibIdent )
@@ -440,7 +441,7 @@ addFinal lp package isAllInOne buildHaddocks = do
440441 pure $ Right Task
441442 { configOpts = TaskConfigOpts missing $ \ missing' ->
442443 let allDeps = Map. union present missing'
443- in configureOpts
444+ in ConfigureOpts. configureOpts
444445 (view envConfigL ctx)
445446 ctx. baseConfigOpts
446447 allDeps
@@ -753,7 +754,7 @@ installPackageGivenDeps isAllInOne buildHaddocks ps package minstalled
753754 Nothing -> ADRToInstall Task
754755 { configOpts = TaskConfigOpts missing $ \ missing' ->
755756 let allDeps = Map. union present missing'
756- in configureOpts
757+ in ConfigureOpts. configureOpts
757758 (view envConfigL ctx)
758759 ctx. baseConfigOpts
759760 allDeps
@@ -1009,22 +1010,22 @@ checkDirtiness ::
10091010checkDirtiness ps installed package present buildHaddocks = do
10101011 ctx <- ask
10111012 moldOpts <- runRIO ctx $ tryGetFlagCache installed
1012- let configOpts = configureOpts
1013+ let configureOpts = ConfigureOpts. configureOpts
10131014 (view envConfigL ctx)
10141015 ctx. baseConfigOpts
10151016 present
10161017 (psLocal ps)
10171018 (installLocationIsMutable $ psLocation ps) -- should be Local i.e. mutable always
10181019 package
1020+ components = case ps of
1021+ PSFilePath lp ->
1022+ Set. map (encodeUtf8 . renderComponent) lp. components
1023+ PSRemote {} -> Set. empty
10191024 wantConfigCache = ConfigCache
1020- { opts = configOpts
1025+ { configureOpts
10211026 , deps = Set. fromList $ Map. elems present
1022- , components =
1023- case ps of
1024- PSFilePath lp ->
1025- Set. map (encodeUtf8 . renderComponent) lp. components
1026- PSRemote {} -> Set. empty
1027- , haddock = buildHaddocks
1027+ , components
1028+ , buildHaddocks
10281029 , pkgSrc = toCachePkgSrc ps
10291030 , pathEnvVar = ctx. pathEnvVar
10301031 }
@@ -1061,7 +1062,7 @@ describeConfigDiff config old new
10611062 | not $ Set. null newComponents =
10621063 Just $ " components added: " `T.append` T. intercalate " , "
10631064 (map (decodeUtf8With lenientDecode) (Set. toList newComponents))
1064- | not old. haddock && new. haddock =
1065+ | not old. buildHaddocks && new. buildHaddocks =
10651066 Just " rebuilding with haddocks"
10661067 | oldOpts /= newOpts = Just $ T. pack $ concat
10671068 [ " flags changed from "
@@ -1099,7 +1100,7 @@ describeConfigDiff config old new
10991100 else stripGhcOptions)
11001101 . map T. pack
11011102 . (\ (ConfigureOpts x y) -> x ++ y)
1102- . (. opts )
1103+ . (. configureOpts )
11031104 where
11041105 -- options set by Stack
11051106 isStackOpt :: Text -> Bool
0 commit comments