Skip to content

Commit 29fbd78

Browse files
committed
fixes
1 parent 7e0de4b commit 29fbd78

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ import Distribution.Simple.Setup
169169
import Distribution.Simple.Utils
170170
( createDirectoryIfMissingVerbose
171171
, dieWithException
172-
, info
173172
, maybeExit
174173
, notice
175174
, rawSystemIOWithEnv
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
packages:
22
bt,
3-
pbts
3+
pbts

cabal-testsuite/PackageTests/BuildToolPaths/cabal.test.hs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@ main = cabalTest $ do
1010
-- shipped with a version of Cabal with SetupHooks).
1111
-- Ever since 716b109c4ae908458b16af5d75c233c7d9fdfc06, we use --intree-cabal-lib in
1212
-- CI, so we should always take the "Just" case which actually runs the test.
13+
--
14+
-- NB: be sure to use v2 commands, as otherwise the testsuite driver will not
15+
-- pass --package-db flags.
1316
Nothing -> skip "Cabal-hooks library unavailable."
14-
Just pkgdb -> recordMode DoNotRecord $ do
17+
Just _pkgdb -> recordMode DoNotRecord $ do
1518
-- At build-time:
1619
--
1720
-- - in a pre-build hook
1821
-- - in a Template Haskell splice
19-
cabal "build" [ "all", "--enable-tests", "--enable-benchmarks", "--package-db=" ++ pkgdb ]
22+
cabal "v2-build" [ "all", "--enable-tests", "--enable-benchmarks"]
2023
-- At runtime of a test-suite
21-
cabal "test" [ "pbts", "--package-db=" ++ pkgdb ]
24+
cabal "v2-test" [ "pbts" ]
2225
-- At runtime of a benchmark
23-
cabal "bench" [ "pbts", "--package-db=" ++ pkgdb ]
26+
cabal "v2-bench" [ "pbts" ]
2427
-- At runtime of an executable
25-
cabal "run" [ "pbts-exe", "--package-db=" ++ pkgdb ]
28+
cabal "v2-run" [ "pbts-exe" ]

cabal-testsuite/PackageTests/SetupHooks/SetupHooksRecompilation/cabal.test.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ main = cabalTest $ do
66
env <- getTestEnv
77
case testPackageDbPath env of
88
Nothing -> skip "Cabal-hooks library unavailable."
9-
Just pkgdb -> recordMode DoNotRecord $ do
10-
cabal "build" [ "--package-db=" ++ pkgdb ]
9+
Just _pkgdb -> recordMode DoNotRecord $ do
10+
cabal "v2-build" []
1111
let setupHooksPath = testCurrentDir env </> "SetupHooks.hs"
1212
setupHooksExists <- liftIO $ doesFileExist setupHooksPath
1313
unless setupHooksExists $
1414
error "Broken test: tried to write to a SetupHooks.hs file that doesn't exist."
1515
liftIO $ appendFile setupHooksPath "this should fail to compile!"
1616
-- If this doesn't fail, it's because we didn't re-build.
17-
fails $ cabal "build" [ "--package-db=" ++ pkgdb ]
17+
fails $ cabal "v2-build" []

0 commit comments

Comments
 (0)