-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cabal: Add flag to ignore build tool dependencies
Add a flag to disable the hard requirement on the build-tools-(depends) declared on the Cabal package. When this flag is enabled (--ignore-build-tools), a build-tool which can't be found does not block compilation. Fixes #10061 (cherry picked from commit ef56d72) # Conflicts: # Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs # cabal-install/src/Distribution/Client/Setup.hs
- Loading branch information
1 parent
260ecdc
commit 7e78f07
Showing
12 changed files
with
105 additions
and
23 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
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
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
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,7 @@ | ||
module Main where | ||
|
||
a :: String | ||
a = "0000" | ||
|
||
main :: IO () | ||
main = putStrLn a |
13 changes: 13 additions & 0 deletions
13
cabal-testsuite/PackageTests/IgnoreBuildTools/client.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,13 @@ | ||
cabal-version: 3.0 | ||
name: client | ||
version: 0.1.0.0 | ||
license: MIT | ||
category: Testing | ||
build-type: Simple | ||
|
||
executable hello-world | ||
main-is: Hello.hs | ||
build-depends: base | ||
build-tool-depends: pre-proc:zero-to-one, another:non-existent | ||
-- build-tools: somethingnonexists | ||
default-language: Haskell2010 |
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,5 @@ | ||
# Setup configure | ||
Configuring client-0.1.0.0... | ||
# Setup build | ||
Preprocessing executable 'hello-world' for client-0.1.0.0... | ||
Building executable 'hello-world' for client-0.1.0.0... |
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,5 @@ | ||
import Test.Cabal.Prelude | ||
-- Test --ignore-build-tools ignores build-tools and build-tool-depends | ||
main = setupTest $ do | ||
setup "configure" ["--ignore-build-tools"] | ||
setup "build" [] |
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,12 @@ | ||
synopsis: Add flag ignore-build-tools | ||
packages: Cabal | ||
prs: #10128 | ||
|
||
description: { | ||
|
||
- Adds flag --ignore-build-tools which allows a user to ignore the tool | ||
dependencies declared in build-tool-depends. For general use, this flag | ||
should never be needed, but it may be useful for packagers. | ||
|
||
} | ||
|