Commit 3427641f authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Comments.

parent 1b45cea2
...@@ -248,14 +248,18 @@ externalSetupMethod verbosity options pkg bt mkargs = do ...@@ -248,14 +248,18 @@ externalSetupMethod verbosity options pkg bt mkargs = do
case savedVer of case savedVer of
Just version | version `withinRange` useCabalVersion options Just version | version `withinRange` useCabalVersion options
-> do updateSetupScript version bt -> do updateSetupScript version bt
-- Does the previously compiled setup executable still exist and
-- is it up-to date?
useExisting <- canUseExistingSetup version useExisting <- canUseExistingSetup version
if useExisting if useExisting
then return (version, Nothing, options) then return (version, Nothing, options)
else installedVersion else installedVersion
_ -> installedVersion _ -> installedVersion
where where
-- TODO: fold this check into 'getCachedSetupExecutable' -- This check duplicates the checks in 'getCachedSetupExecutable' /
-- so that it's not done twice. -- 'compileSetupExecutable'. Unfortunately, we have to perform it twice
-- because the selected Cabal version may change as a result of this
-- check.
canUseExistingSetup :: Version -> IO Bool canUseExistingSetup :: Version -> IO Bool
canUseExistingSetup version = canUseExistingSetup version =
if useCachedSetupExecutable if useCachedSetupExecutable
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment