Skip to content

Commit 3666842

Browse files
committed
Revert "Allow build-type Configure to work with Components"
This reverts commit 07f4dd5.
1 parent 28fc6ea commit 3666842

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

cabal-install/src/Distribution/Client/Configure.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ configureSetupScript
300300
, useDependenciesExclusive = not defaultSetupDeps && isJust explicitSetupDeps
301301
, useVersionMacros = not defaultSetupDeps && isJust explicitSetupDeps
302302
, isInteractive = False
303-
, isComponent = False
304303
}
305304
where
306305
-- When we are compiling a legacy setup script without an explicit

cabal-install/src/Distribution/Client/ProjectPlanning.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,10 +1833,7 @@ elaborateInstallPlan
18331833
-- Once you've implemented this, swap it for the code below.
18341834
cuz_buildtype =
18351835
case bt of
1836-
PD.Configure -> []
1837-
-- Configure is supported, but we only support configuring the
1838-
-- main library in cabal. Other components will need to depend
1839-
-- on the main library for configured data.
1836+
PD.Configure -> [CuzBuildType CuzConfigureBuildType]
18401837
PD.Custom -> [CuzBuildType CuzCustomBuildType]
18411838
PD.Hooks -> [CuzBuildType CuzHooksBuildType]
18421839
PD.Make -> [CuzBuildType CuzMakeBuildType]
@@ -4031,9 +4028,6 @@ setupHsScriptOptions
40314028
, forceExternalSetupMethod = isParallelBuild
40324029
, setupCacheLock = Just cacheLock
40334030
, isInteractive = False
4034-
, isComponent = case elabPkgOrComp of
4035-
ElabPackage{} -> False
4036-
ElabComponent{} -> True
40374031
}
40384032

40394033
-- | To be used for the input for elaborateInstallPlan.

cabal-install/src/Distribution/Client/SetupWrapper.hs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,6 @@ data SetupScriptOptions = SetupScriptOptions
314314
-- ^ Is the task we are going to run an interactive foreground task,
315315
-- or an non-interactive background task? Based on this flag we
316316
-- decide whether or not to delegate ctrl+c to the spawned task
317-
, isComponent :: Bool
318-
-- ^ Let the setup script logic know if it is being run to build a component
319-
-- or a package. This is used to determine if we should use the configure
320-
-- command, if the build-type is 'Configure'. For configure, only the
321-
-- main library has 'configure' support, and thus we can skip running
322-
-- configure for components.
323317
}
324318

325319
defaultSetupScriptOptions :: SetupScriptOptions
@@ -344,7 +338,6 @@ defaultSetupScriptOptions =
344338
, forceExternalSetupMethod = False
345339
, setupCacheLock = Nothing
346340
, isInteractive = False
347-
, isComponent = False
348341
}
349342

350343
workingDir :: SetupScriptOptions -> FilePath
@@ -381,9 +374,7 @@ getSetup verbosity options mpkg = do
381374
(useCabalVersion options)
382375
(orLaterVersion (mkVersion (cabalSpecMinimumLibraryVersion (specVersion pkg))))
383376
}
384-
buildType' = case (buildType pkg, isComponent options) of
385-
(Configure, True) -> Simple
386-
(bt, _) -> bt
377+
buildType' = buildType pkg
387378
(version, method, options'') <-
388379
getSetupMethod verbosity options' pkg buildType'
389380
return

0 commit comments

Comments
 (0)