-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Running ./setup install will give you an error: ``` fromFlag NoFlag. Use fromFlagOrDefault CallStack (from HasCallStack): error, called at src/Distribution/Simple/Flag.hs:110:19 in Cabal-3.15.0.0-inplace:Distribution.Simple.Flag fromFlag, called at src/Distribution/Simple/Register.hs:161:16 in Cabal-3.15.0.0-inplace:Distribution.Simple.Register ``` This seems to not be tested anywhere and most people will use ./setup register in any case, but we should fix this for the next point release in 3.14 series. # Please enter the commit message for your changes. Lines starting Fixes #10416 (cherry picked from commit 2a178f2) # Conflicts: # Cabal/src/Distribution/Simple.hs
- Loading branch information
1 parent
01d22f7
commit 1cb7876
Showing
7 changed files
with
52 additions
and
0 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
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/Install/DistPrefInstall/CHANGELOG.md
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 @@ | ||
# Revision history for DistPrefInstall | ||
|
||
## 0.1.0.0 -- YYYY-mm-dd | ||
|
||
* First version. Released on an unsuspecting world. |
18 changes: 18 additions & 0 deletions
18
cabal-testsuite/PackageTests/Install/DistPrefInstall/DistPrefInstall.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: 3.12 | ||
name: DistPrefInstall | ||
version: 0.1.0.0 | ||
license: NONE | ||
author: Matthew Pickering | ||
maintainer: matthewtpickering@gmail.com | ||
build-type: Simple | ||
extra-doc-files: CHANGELOG.md | ||
|
||
common warnings | ||
ghc-options: -Wall | ||
|
||
library | ||
import: warnings | ||
exposed-modules: MyLib | ||
build-depends: base | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/Install/DistPrefInstall/Setup.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,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/Install/DistPrefInstall/setup.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,8 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = setupTest $ recordMode DoNotRecord $ withPackageDb $ do | ||
setup "configure" [] | ||
setup "build" [] | ||
setup "copy" [] | ||
setup "install" [] | ||
setup "sdist" [] |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/Install/DistPrefInstall/src/MyLib.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 @@ | ||
module MyLib (someFunc) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn "someFunc" |
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: Fix ./setup install command | ||
packages: Cabal | ||
prs: #10417 | ||
issues: #10416 | ||
significance: significant | ||
|
||
description: { | ||
|
||
- `./setup install` was failing with a `fromFlag NoFlag` error. It is now fixed. | ||
|
||
} |