File tree 9 files changed +73
-6
lines changed
cabal-install/src/Distribution/Client
cabal-testsuite/PackageTests/WorkingDir 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
635
635
filterCommonFlags flags cabalLibVersion
636
636
-- NB: we expect the latest version to be the most common case,
637
637
-- so test it first.
638
- | cabalLibVersion >= mkVersion [3 , 11 , 0 ] = flags_latest
638
+ | cabalLibVersion >= mkVersion [3 , 13 , 0 ] = flags_latest
639
639
| cabalLibVersion < mkVersion [1 , 2 , 5 ] = flags_1_2_5
640
640
| 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
642
642
| otherwise = error " the impossible just happened" -- see first guard
643
643
where
644
644
flags_latest = flags
645
- flags_3_11_0 =
645
+ flags_3_13_0 =
646
646
flags_latest
647
647
{ setupWorkingDir = NoFlag
648
648
}
649
- -- Cabal < 3.11 does not support the --working-dir flag.
649
+ -- Cabal < 3.13 does not support the --working-dir flag.
650
650
flags_2_1_0 =
651
- flags_3_11_0
651
+ flags_3_13_0
652
652
{ -- 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 )
654
654
}
655
655
flags_1_2_5 =
656
656
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.12
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.12
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