diff --git a/src/Stack/Build/Execute.hs b/src/Stack/Build/Execute.hs index b8a1ad987c..3f822f4ac4 100644 --- a/src/Stack/Build/Execute.hs +++ b/src/Stack/Build/Execute.hs @@ -626,13 +626,19 @@ ensureConfig newConfigCache pkgDir ExecuteEnv {..} announce cabal cabalfp = do if boptsReconfigure eeBuildOpts then return True else do + -- We can ignore the components portion of the config + -- cache, because it's just used to inform 'construct + -- plan that we need to plan to build additional + -- components. These components don't affect the actual + -- package configuration. + let ignoreComponents cc = cc { configCacheComponents = Set.empty } -- Determine the old and new configuration in the local directory, to -- determine if we need to reconfigure. mOldConfigCache <- tryGetConfigCache pkgDir mOldCabalMod <- tryGetCabalMod pkgDir - return $ fmap configCacheOpts mOldConfigCache /= Just (configCacheOpts newConfigCache) + return $ fmap ignoreComponents mOldConfigCache /= Just (ignoreComponents newConfigCache) || mOldCabalMod /= Just newCabalMod let ConfigureOpts dirs nodirs = configCacheOpts newConfigCache when needConfig $ withMVar eeConfigureLock $ \_ -> do