-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter Setup flags: filter working dir on < 3.13
The --working-dir flag is only available for Cabal >= 3.13. This commit fixes an incorrect conditional: we only filtered out this flag for Cabal < 3.11, instead of < 3.13. Test: PackageTests/WorkingDir Fixes #9940
- Loading branch information
Showing
9 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Dep(foo) | ||
|
||
main :: IO () | ||
main = print foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Main where | ||
|
||
import Distribution.Simple ( defaultMain ) | ||
|
||
main :: IO () | ||
main = defaultMain | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages: ., dep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Dep where | ||
|
||
foo :: Int | ||
foo = 17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Main where | ||
|
||
import Distribution.Simple ( defaultMain ) | ||
|
||
main :: IO () | ||
main = defaultMain | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cabal-version: 2.4 | ||
name: dep | ||
version: 0.1.0.0 | ||
synopsis: Test that we don't pass --working-dir when unsupported | ||
license: BSD-3-Clause | ||
author: NA | ||
maintainer: NA | ||
category: Testing | ||
build-type: Custom | ||
|
||
custom-setup | ||
setup-depends: base, Cabal >= 2.4 && < 3.13 | ||
|
||
library | ||
build-depends: base | ||
default-language: Haskell2010 | ||
hs-source-dirs: . | ||
exposed-modules: Dep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ recordMode DoNotRecord $ do | ||
skipUnlessAnyCabalVersion "< 3.13" | ||
cabalWithStdin "v2-build" [] "" | ||
return () |
18 changes: 18 additions & 0 deletions
18
cabal-testsuite/PackageTests/WorkingDir/working-dir-test.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cabal-version: 2.4 | ||
name: working-dir-test | ||
version: 0.1.0.0 | ||
synopsis: Test that we don't pass --working-dir when unsupported | ||
license: BSD-3-Clause | ||
author: NA | ||
maintainer: NA | ||
category: Testing | ||
build-type: Custom | ||
|
||
custom-setup | ||
setup-depends: base, Cabal >= 2.4 && < 3.13 | ||
|
||
executable Exe | ||
default-language: Haskell2010 | ||
build-depends: base, dep | ||
hs-source-dirs: . | ||
main-is: Main.hs |