forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider Installed packages when pruning the install plan
The discussion in haskell#6952 indicated that extra-packages stanzas wouldn't quite work yet. It turns out in order for cabal to find exes for already installed extra-packages we need to also consider `installed` packages when pruning the install plan. Includes some changes to OutputNormalizer
- Loading branch information
Showing
10 changed files
with
66 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module Foo where |
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 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal v2-run | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- some-exe-0.0.1.0 (exe:some-exe) (requires build) | ||
Configuring some-exe-0.0.1.0... | ||
Preprocessing executable 'some-exe' for some-exe-0.0.1.0.. | ||
Building executable 'some-exe' for some-exe-0.0.1.0.. | ||
Installing executable some-exe in <PATH> | ||
Warning: The directory <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>/incoming/new-<RAND><ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>/<PACKAGE>-<HASH>/bin is not in the system search path. |
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: . | ||
extra-packages: some-exe |
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 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ withRepo "repo" $ do | ||
cabal "v2-run" [ "some-exe" ] |
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,9 @@ | ||
name: my | ||
version: 0.1 | ||
license: BSD3 | ||
cabal-version: >= 1.2 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Foo | ||
build-depends: base |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/ExtraPackages/repo/some-exe-0.0.1.0/Main.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 Main where | ||
|
||
main :: IO () | ||
main = putStrLn "hello world" |
9 changes: 9 additions & 0 deletions
9
cabal-testsuite/PackageTests/ExtraPackages/repo/some-exe-0.0.1.0/some-exe.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,9 @@ | ||
name: some-exe | ||
version: 0.0.1.0 | ||
license: BSD3 | ||
cabal-version: >= 1.2 | ||
build-type: Simple | ||
|
||
Executable some-exe | ||
main-is: Main.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
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 @@ | ||
synopsis: Make extra-packages work properly | ||
packages: cabal-install | ||
prs: #6972 |