Skip to content

Commit cce62ae

Browse files
committed
Revert "Only reconfigure when conifgCacheOpts changes"
This reverts commit 7cd87cb.
1 parent 5859220 commit cce62ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Stack/Build/Execute.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,13 +626,19 @@ ensureConfig newConfigCache pkgDir ExecuteEnv {..} announce cabal cabalfp = do
626626
if boptsReconfigure eeBuildOpts
627627
then return True
628628
else do
629+
-- We can ignore the components portion of the config
630+
-- cache, because it's just used to inform 'construct
631+
-- plan that we need to plan to build additional
632+
-- components. These components don't affect the actual
633+
-- package configuration.
634+
let ignoreComponents cc = cc { configCacheComponents = Set.empty }
629635
-- Determine the old and new configuration in the local directory, to
630636
-- determine if we need to reconfigure.
631637
mOldConfigCache <- tryGetConfigCache pkgDir
632638

633639
mOldCabalMod <- tryGetCabalMod pkgDir
634640

635-
return $ fmap configCacheOpts mOldConfigCache /= Just (configCacheOpts newConfigCache)
641+
return $ fmap ignoreComponents mOldConfigCache /= Just (ignoreComponents newConfigCache)
636642
|| mOldCabalMod /= Just newCabalMod
637643
let ConfigureOpts dirs nodirs = configCacheOpts newConfigCache
638644
when needConfig $ withMVar eeConfigureLock $ \_ -> do

0 commit comments

Comments
 (0)