forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
One-component configure, fixes haskell#2802.
Described in: ghc-proposals/ghc-proposals#4 ./Setup configure now takes an argument to specify a specific component name that should solely be configured. Most of the gyrations in Configure are all about making it so that we can feed in internal dependencies via --dependency. I dropped the package name match sanity check to handle convenience library package name munging. Consider an internal library named 'q' in package 'p'. When we install it to the package database, we munged the package name into 'z-p-z-q', so that it doesn't conflict with the actual package named 'q'. Now consider when we feed it in with --dependency q=p-0.1-hash-q. Previously, Cabal checked that the 'q' in --dependency matched the package name in the database... which it doesn't. So I dropped the check. I also had to make register/copy unconditionally install internal libraries; otherwise you can't refer to them from later builds. Also a miscellaneous refactor: convenience libraries are printed with a "header" stanza now (not really a stanza header). Signed-off-by: Edward Z. Yang <[email protected]>
- Loading branch information
Showing
27 changed files
with
360 additions
and
144 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 @@ | ||
module Main where | ||
|
||
main :: IO () | ||
main = putStrLn "Hello, Haskell!" |
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 @@ | ||
name: Exe | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
executable goodexe | ||
main-is: Good.hs | ||
build-depends: base | ||
default-language: Haskell2010 | ||
|
||
-- We deliberately don't configure badexe, so that we can build ONLY goodexe | ||
executable badexe | ||
main-is: Bad.hs | ||
build-depends: totally-impossible-dependency-to-fill == 10000.25.6 | ||
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,4 @@ | ||
module Main where | ||
|
||
main :: IO () | ||
main = putStrLn "OK" |
18 changes: 18 additions & 0 deletions
18
Cabal/tests/PackageTests/ConfigureComponent/SubLib/Lib.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 @@ | ||
name: Lib | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library sublib | ||
build-depends: base | ||
exposed-modules: Lib | ||
default-language: Haskell2010 | ||
|
||
executable exe | ||
main-is: Exe.hs | ||
build-depends: base, sublib | ||
hs-source-dirs: exe | ||
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,2 @@ | ||
module Lib where | ||
lib = "OK" |
2 changes: 2 additions & 0 deletions
2
Cabal/tests/PackageTests/ConfigureComponent/SubLib/exe/Exe.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 Lib | ||
main = putStrLn lib |
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 @@ | ||
module Lib where | ||
lib = "OK" |
18 changes: 18 additions & 0 deletions
18
Cabal/tests/PackageTests/ConfigureComponent/Test/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 @@ | ||
name: test-for-cabal | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: Lib | ||
build-depends: base | ||
default-language: Haskell2010 | ||
|
||
test-suite testsuite | ||
build-depends: test-for-cabal, testlib, base | ||
type: exitcode-stdio-1.0 | ||
main-is: Test.hs | ||
hs-source-dirs: tests |
3 changes: 3 additions & 0 deletions
3
Cabal/tests/PackageTests/ConfigureComponent/Test/testlib/TestLib.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,3 @@ | ||
module TestLib where | ||
import Lib | ||
testlib = lib |
12 changes: 12 additions & 0 deletions
12
Cabal/tests/PackageTests/ConfigureComponent/Test/testlib/testlib.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,12 @@ | ||
name: testlib | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: TestLib | ||
build-depends: test-for-cabal, base | ||
default-language: Haskell2010 |
2 changes: 2 additions & 0 deletions
2
Cabal/tests/PackageTests/ConfigureComponent/Test/tests/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,2 @@ | ||
import TestLib | ||
main = putStrLn testlib |
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
Oops, something went wrong.