-
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.
Accept components to copy in ./Setup copy, fixes #2780.
Signed-off-by: Edward Z. Yang <[email protected]>
- Loading branch information
Showing
15 changed files
with
166 additions
and
65 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,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,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,15 @@ | ||
name: myprog | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
executable myprog | ||
main-is: Main.hs | ||
build-depends: base | ||
|
||
executable myprog2 | ||
main-is: Main2.hs | ||
build-depends: base |
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 P | ||
main = print p |
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,17 @@ | ||
name: p | ||
version: 0.1.0.0 | ||
license: BSD3 | ||
author: Edward Z. Yang | ||
maintainer: [email protected] | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
exposed-modules: P | ||
hs-source-dirs: src | ||
build-depends: base | ||
default-language: Haskell2010 | ||
|
||
executable pprog | ||
main-is: Main.hs | ||
build-depends: p |
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 P where | ||
p = 12 |
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 |
---|---|---|
|
@@ -312,6 +312,20 @@ tests config = do | |
_ <- shell "autoreconf" ["-i"] | ||
cabal_build [] | ||
|
||
-- Test that per-component copy works, when only building library | ||
tc "CopyComponent/Lib" $ | ||
withPackageDb $ do | ||
cabal "configure" [] | ||
cabal "build" ["lib:p"] | ||
cabal "copy" ["lib:p"] | ||
|
||
-- Test that per-component copy works, when only building one executable | ||
tc "CopyComponent/Exe" $ | ||
withPackageDb $ do | ||
cabal "configure" [] | ||
cabal "build" ["myprog"] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ezyang
Author
Contributor
|
||
cabal "copy" ["myprog"] | ||
|
||
where | ||
ghc_pkg_guess bin_name = do | ||
cwd <- packageDir | ||
|
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
Why does this deviate from the syntax for configuring components? Doesn't make sense.