-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Add support for loading multiple components into one repl session
* Add setup.Cabal>=3.11 constraint when multi-repl is enabled (+ test)
- Loading branch information
Showing
11 changed files
with
122 additions
and
19 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
10 changes: 10 additions & 0 deletions
10
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/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,10 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal v2-repl | ||
Resolving dependencies... | ||
Error: cabal: Could not resolve dependencies: | ||
[__0] trying: pkg-a-0 (user goal) | ||
[__1] next goal: pkg-a:setup.Cabal (dependency of pkg-a) | ||
[__1] rejecting: pkg-a:setup.Cabal-<VERSION>/installed-<HASH>, pkg-a:setup.Cabal-3.8.0.0 (constraint from --enable-multi-repl requires >=3.11) | ||
[__1] fail (backjumping, conflict set: pkg-a, pkg-a:setup.Cabal) | ||
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: pkg-a:setup.Cabal (3), pkg-a (2) |
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/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,2 @@ | ||
packages: pkg-a/*.cabal | ||
packages: pkg-b/*.cabal |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/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,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ withRepo "repo" $ do | ||
skipUnlessGhcVersion ">= 9.4" | ||
void $ fails $ cabalWithStdin "v2-repl" ["--keep-temp-files","--enable-multi-repl","pkg-a", "pkg-b"] "" |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/pkg-a/Foo.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 Foo where | ||
|
||
foo :: Int | ||
foo = 42 | ||
|
2 changes: 2 additions & 0 deletions
2
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/pkg-a/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 |
14 changes: 14 additions & 0 deletions
14
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/pkg-a/pkg-a.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,14 @@ | ||
cabal-version: 2.2 | ||
name: pkg-a | ||
version: 0 | ||
build-type: Custom | ||
|
||
custom-setup | ||
setup-depends: | ||
base >= 4 && < 5, | ||
Cabal < 3.11 | ||
|
||
library | ||
default-language: Haskell2010 | ||
build-depends: base | ||
exposed-modules: Foo |
6 changes: 6 additions & 0 deletions
6
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/pkg-b/Bar.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 @@ | ||
module Bar (foo, bar) where | ||
|
||
import Foo (foo) | ||
|
||
bar :: Int | ||
bar = 0xdeadc0de |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/pkg-b/pkg-b.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,8 @@ | ||
cabal-version: 2.2 | ||
name: pkg-b | ||
version: 0 | ||
|
||
library | ||
default-language: Haskell2010 | ||
build-depends: base, pkg-a | ||
exposed-modules: Bar |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/MultiRepl/CabalTooOld/repo/Cabal-3.8.0.0/Cabal.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,5 @@ | ||
cabal-version: 3.0 | ||
-- Simulate an old Cabal | ||
name: Cabal | ||
version: 3.8.0.0 | ||
library |