-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn if builddir is going to be ignored (#8949)
* Unify the default project with the implicit one Passing --ignore-project made cabal use `defaultProject` which is not quite identical to the one used when cabal.project is missing (`defaultImplifictProjectConfig`). There is no reason the two should be different. * Warn if builddir is going to be ignored. builddir can only be specified from the command line. Closes: #7941 * Clarify which project option can only be passed from the command line * Add note about reading the project configuration
- Loading branch information
1 parent
4a99076
commit eaa38b6
Showing
8 changed files
with
105 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# cabal v2-build | ||
Warning: The builddir option is not supported in project and config files. It will be ignored. | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following would be built: | ||
- main-0.1 (lib) (first run) |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/Project/WarnBuilddir/cabal.project
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,2 @@ | ||
packages: . | ||
builddir: something |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/Project/WarnBuilddir/cabal.test.hs
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 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
cabal "v2-build" ["--dry-run", "all"] |
14 changes: 14 additions & 0 deletions
14
cabal-testsuite/PackageTests/Project/WarnBuilddir/main.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,14 @@ | ||
cabal-version: 3.0 | ||
|
||
name: main | ||
version: 0.1 | ||
build-type: Simple | ||
category: Test | ||
maintainer: Joe | ||
synopsis: Test input | ||
description: Test input | ||
license: BSD-3-Clause | ||
|
||
library | ||
build-depends: base | ||
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,11 @@ | ||
synopsis: Warn when project configuration options are going to be ignored. | ||
packages: cabal-install | ||
prs: #8949 | ||
|
||
description: { | ||
|
||
Some project configuration options can only be specified from the command line. | ||
If the user specified those options from a project file, cabal-install would | ||
silently ignore them. Now cabal-install will emit a warning. | ||
|
||
} |
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