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.
Fix haskell#6083: Treat pkg:sublib dependency syntax as is since 3.4
Note: configuredPackageProblems is a mess, and there might be bugs now.
- Loading branch information
Showing
16 changed files
with
105 additions
and
82 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 was deleted.
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
15 changes: 15 additions & 0 deletions
15
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/cabal.out
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 @@ | ||
# cabal v2-run | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- pkg-def-0.1.0.0 (lib) (first run) | ||
- pkg-abc-0.1.0.0 (exe:program) (first run) | ||
Warning: pkg-def.cabal:13:27: visibility is experimental feature (issue #5660) | ||
Configuring library for pkg-def-0.1.0.0.. | ||
Preprocessing library for pkg-def-0.1.0.0.. | ||
Building library for pkg-def-0.1.0.0.. | ||
Warning: pkg-abc.cabal:19:15: colon specifier is experimental feature (issue #5660) | ||
Configuring executable 'program' for pkg-abc-0.1.0.0.. | ||
Warning: The package has an extraneous version range for a dependency on an internal library: pkg-def >=0 && ==0.1.0.0. This version range includes the current package but isn't needed as the current package's library will always be used. | ||
Preprocessing executable 'program' for pkg-abc-0.1.0.0.. | ||
Building executable 'program' for pkg-abc-0.1.0.0.. |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/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,4 @@ | ||
packages: | ||
pkg-abc | ||
pkg-def | ||
|
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/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,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
-- https://github.com/haskell/cabal/issues/6083 | ||
-- see pkg-abc.cabal | ||
main = cabalTest $ | ||
cabal' "v2-run" ["pkg-abc:program"] >>= assertOutputContains "pkg-def:pkg-def" |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/pkg-abc/exe/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,5 @@ | ||
module Main (main) where | ||
import PkgDef (defValue) | ||
|
||
main :: IO () | ||
main = print defValue |
19 changes: 19 additions & 0 deletions
19
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/pkg-abc/pkg-abc.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,19 @@ | ||
cabal-version: 3.4 | ||
name: pkg-abc | ||
version: 0.1.0.0 | ||
|
||
library pkg-def | ||
default-language: Haskell2010 | ||
hs-source-dirs: pkg-def | ||
build-depends: base | ||
exposed-modules: PkgDef | ||
|
||
executable program | ||
default-language: Haskell2010 | ||
hs-source-dirs: exe | ||
main-is: Main.hs | ||
|
||
-- we want that to resolve to pkg-def main library. | ||
build-depends: | ||
, base | ||
, pkg-def:pkg-def |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/pkg-abc/pkg-def/PkgDef.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 PkgDef (defValue) where | ||
|
||
defValue :: String | ||
defValue = "pkg-abc:pkg-def" |
17 changes: 17 additions & 0 deletions
17
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/pkg-def/pkg-def.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,17 @@ | ||
cabal-version: 3.0 | ||
name: pkg-def | ||
version: 0.1.0.0 | ||
|
||
library | ||
default-language: Haskell2010 | ||
hs-source-dirs: src | ||
build-depends: base | ||
exposed-modules: PkgDef | ||
|
||
library publib | ||
default-language: Haskell2010 | ||
visibility: public | ||
hs-source-dirs: publib | ||
build-depends: base | ||
exposed-modules: PkgDef | ||
|
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/pkg-def/publib/PkgDef.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 PkgDef (defValue) where | ||
|
||
defValue :: String | ||
defValue = "pkg-def:publib" |
4 changes: 4 additions & 0 deletions
4
cabal-testsuite/PackageTests/MultipleLibraries/T6083Post/pkg-def/src/PkgDef.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 PkgDef (defValue) where | ||
|
||
defValue :: String | ||
defValue = "pkg-def:pkg-def" |