Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MONOLITHIC build #6585

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ cabal-install-dev : cabal-install/cabal-install.cabal.pp
@echo "tell git to ignore changes to cabal-install.cabal:"
@echo "git update-index --assume-unchanged cabal-install/cabal-install.cabal"

cabal-install-monolithic : cabal-install/cabal-install.cabal.pp
runghc cabal-dev-scripts/src/Preprocessor.hs -o cabal-install/cabal-install.cabal -f CABAL_FLAG_LIB -f CABAL_FLAG_MONOLITHIC cabal-install/cabal-install.cabal.pp
@echo "tell git to ignore changes to cabal-install.cabal:"
@echo "git update-index --assume-unchanged cabal-install/cabal-install.cabal"

# extra-source-files generation

gen-extra-source-files : gen-extra-source-files-lib gen-extra-source-files-cli
Expand Down
71 changes: 0 additions & 71 deletions cabal-install/cabal-install.cabal.pp
Original file line number Diff line number Diff line change
Expand Up @@ -436,77 +436,6 @@
$CABAL_BUILDINFO
%endif
#
# MONOLITHIC exe additions
#
%if CABAL_FLAG_LIB
%if CABAL_FLAG_MONOLITHIC
-- Monolithic: tests fused into executable
hs-source-dirs: tests
other-modules:
UnitTests
MemoryUsageTests
SolverQuickCheck
IntegrationTests2

UnitTests.Distribution.Client.ArbitraryInstances
UnitTests.Distribution.Client.FileMonitor
UnitTests.Distribution.Client.Get
UnitTests.Distribution.Client.GenericInstances
UnitTests.Distribution.Client.GZipUtils
UnitTests.Distribution.Client.Glob
UnitTests.Distribution.Client.IndexUtils.Timestamp
UnitTests.Distribution.Client.InstallPlan
UnitTests.Distribution.Client.JobControl
UnitTests.Distribution.Client.ProjectConfig
UnitTests.Distribution.Client.Sandbox
UnitTests.Distribution.Client.Sandbox.Timestamp
UnitTests.Distribution.Client.Store
UnitTests.Distribution.Client.Tar
UnitTests.Distribution.Client.Targets
UnitTests.Distribution.Client.TreeDiffInstances
UnitTests.Distribution.Client.UserConfig
UnitTests.Distribution.Client.VCS
UnitTests.Distribution.Solver.Modular.Builder
UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
UnitTests.Distribution.Solver.Modular.MemoryUsage
UnitTests.Distribution.Solver.Modular.QuickCheck
UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
UnitTests.Distribution.Solver.Modular.RetryLog
UnitTests.Distribution.Solver.Modular.Solver
UnitTests.Distribution.Solver.Modular.WeightedPSQ
UnitTests.Options
UnitTests.TempTestDir

cpp-options: -DMONOLITHIC
build-depends:
Cabal == 3.3.*,
cabal-install-solver-dsl,
QuickCheck >= 2.8.2,
array,
async,
bytestring,
containers,
deepseq,
directory,
edit-distance,
filepath,
hashable,
mtl,
network,
network-uri,
pretty-show >= 1.6.15,
random,
tagged,
tar,
tasty >= 1.2.3 && < 1.3,
tasty-hunit >= 0.10,
tasty-quickcheck,
tree-diff,
time,
zlib
%endif
%endif
#
# Test-suites
# disable if we don't configure with an (internal) libs
#
Expand Down
23 changes: 0 additions & 23 deletions cabal-install/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,33 +197,10 @@ import Control.Exception (SomeException(..), try)
import Control.Monad (mapM_)
import Data.Version (showVersion)

#ifdef MONOLITHIC
import qualified UnitTests
import qualified MemoryUsageTests
import qualified SolverQuickCheck
import qualified IntegrationTests2
import qualified System.Environment as Monolithic
#endif

-- | Entry point
--
main :: IO ()
#ifdef MONOLITHIC
main = do
mb_exec <- Monolithic.lookupEnv "CABAL_INSTALL_MONOLITHIC_MODE"
case mb_exec of
Just "UnitTests" -> UnitTests.main
Just "MemoryUsageTests" -> MemoryUsageTests.main
Just "SolverQuickCheck" -> SolverQuickCheck.main
Just "IntegrationTests2" -> IntegrationTests2.main
Just s -> error $ "Unrecognized mode '" ++ show s ++ "' in CABAL_INSTALL_MONOLITHIC_MODE"
Nothing -> main'
#else
main = main'
#endif

main' :: IO ()
main' = do
-- Enable line buffering so that we can get fast feedback even when piped.
-- This is especially important for CI and build systems.
hSetBuffering stdout LineBuffering
Expand Down