File tree Expand file tree Collapse file tree 9 files changed +73
-6
lines changed
cabal-install/src/Distribution/Client
cabal-testsuite/PackageTests/WorkingDir Expand file tree Collapse file tree 9 files changed +73
-6
lines changed Original file line number Diff line number Diff line change @@ -635,22 +635,22 @@ filterCommonFlags :: CommonSetupFlags -> Version -> CommonSetupFlags
635635filterCommonFlags flags cabalLibVersion
636636 -- NB: we expect the latest version to be the most common case,
637637 -- so test it first.
638- | cabalLibVersion >= mkVersion [3 , 11 , 0 ] = flags_latest
638+ | cabalLibVersion >= mkVersion [3 , 13 , 0 ] = flags_latest
639639 | cabalLibVersion < mkVersion [1 , 2 , 5 ] = flags_1_2_5
640640 | cabalLibVersion < mkVersion [2 , 1 , 0 ] = flags_2_1_0
641- | cabalLibVersion < mkVersion [3 , 11 , 0 ] = flags_3_11_0
641+ | cabalLibVersion < mkVersion [3 , 13 , 0 ] = flags_3_13_0
642642 | otherwise = error " the impossible just happened" -- see first guard
643643 where
644644 flags_latest = flags
645- flags_3_11_0 =
645+ flags_3_13_0 =
646646 flags_latest
647647 { setupWorkingDir = NoFlag
648648 }
649- -- Cabal < 3.11 does not support the --working-dir flag.
649+ -- Cabal < 3.13 does not support the --working-dir flag.
650650 flags_2_1_0 =
651- flags_3_11_0
651+ flags_3_13_0
652652 { -- Cabal < 2.1 doesn't know about -v +timestamp modifier
653- setupVerbosity = fmap verboseNoTimestamp (setupVerbosity flags_3_11_0 )
653+ setupVerbosity = fmap verboseNoTimestamp (setupVerbosity flags_3_13_0 )
654654 }
655655 flags_1_2_5 =
656656 flags_2_1_0
Original file line number Diff line number Diff line change 1+ module Main where
2+
3+ import Dep (foo )
4+
5+ main :: IO ()
6+ main = print foo
Original file line number Diff line number Diff line change 1+ module Main where
2+
3+ import Distribution.Simple ( defaultMain )
4+
5+ main :: IO ()
6+ main = defaultMain
7+
Original file line number Diff line number Diff line change 1+ packages : ., dep
Original file line number Diff line number Diff line change 1+ module Dep where
2+
3+ foo :: Int
4+ foo = 17
Original file line number Diff line number Diff line change 1+ module Main where
2+
3+ import Distribution.Simple ( defaultMain )
4+
5+ main :: IO ()
6+ main = defaultMain
7+
Original file line number Diff line number Diff line change 1+ cabal-version : 2.4
2+ name : dep
3+ version : 0.1.0.0
4+ synopsis : Test that we don't pass --working-dir when unsupported
5+ license : BSD-3-Clause
6+ author : NA
7+ maintainer : NA
8+ category : Testing
9+ build-type : Custom
10+
11+ custom-setup
12+ setup-depends : base, Cabal >= 2.4 && < 3.13
13+
14+ library
15+ build-depends : base
16+ default-language : Haskell2010
17+ hs-source-dirs : .
18+ exposed-modules : Dep
Original file line number Diff line number Diff line change 1+ import Test.Cabal.Prelude
2+
3+ main = cabalTest $ recordMode DoNotRecord $ do
4+ skipUnlessAnyCabalVersion " < 3.13"
5+ cabalWithStdin " v2-build" [] " "
6+ return ()
Original file line number Diff line number Diff line change 1+ cabal-version : 2.4
2+ name : working-dir-test
3+ version : 0.1.0.0
4+ synopsis : Test that we don't pass --working-dir when unsupported
5+ license : BSD-3-Clause
6+ author : NA
7+ maintainer : NA
8+ category : Testing
9+ build-type : Custom
10+
11+ custom-setup
12+ setup-depends : base, Cabal >= 2.4 && < 3.13
13+
14+ executable Exe
15+ default-language : Haskell2010
16+ build-depends : base, dep
17+ hs-source-dirs : .
18+ main-is : Main.hs
You can’t perform that action at this time.
0 commit comments