You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2583 (comment) indicates that you're allowed to have two packages, pkg-a and pkg-b that form a dependency cycle in the sense that pkg-a:test depends on pkg-b:lib which depends on pkg-a:lib. However this doesn't seem to play nicely with stack ghci:
Using configuration for pkg-a:test:pkg-a-test to load /home/linuxadmin/stack-dep-cycle/repro/pkg-a/Spec.hs
pkg-a-0.1.0.0: configure (lib)
Configuring pkg-a-0.1.0.0...
pkg-a-0.1.0.0: initial-build-steps (lib)
Configuring GHCi with the following packages: pkg-a
Using main module: 1. Package `pkg-a' component test:pkg-a-test with main-is file: ../pkg-a/Spec.hs
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
<command line>: cannot satisfy -package pkg-b-0.1.0.0
(use -v for more information)
If pkg-b is built (via stack build pkg-b) then stack ghci pkg-a/Spec.hs outputs:
$ stack ghci pkg-a/Spec.hs
Using configuration for pkg-a:test:pkg-a-test to load /home/linuxadmin/stack-dep-cycle/repro/pkg-a/Spec.hs
Configuring GHCi with the following packages: pkg-a
Using main module: 1. Package `pkg-a' component test:pkg-a-test with main-is file: /home/linuxadmin/stack-dep-cycle/repro/pkg-a/Spec.hs
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( /home/linuxadmin/stack-dep-cycle/repro/pkg-a/Spec.hs, interpreted )
Ok, modules loaded: Main.
Loaded GHCi configuration from /tmp/ghci31095/ghci-script
*Main>
I think it should do this without having to build pkg-b first.
The text was updated successfully, but these errors were encountered:
I am closing this issue given the passage of time and because I could not reproduce the issue with Stack 2.15.5. With a two-package project ('package-A', 'package-B') where the test suite of package-A depends on the library of package-B and the library of package-B depends on the library of package-A: (1) stack build worked as expected and (2) stack ghci package-A/test/Spec.hs worked as expected.
#2583 (comment) indicates that you're allowed to have two packages,
pkg-a
andpkg-b
that form a dependency cycle in the sense thatpkg-a:test
depends onpkg-b:lib
which depends onpkg-a:lib
. However this doesn't seem to play nicely withstack ghci
:Output:
If
pkg-b
is built (viastack build pkg-b
) thenstack ghci pkg-a/Spec.hs
outputs:I think it should do this without having to build
pkg-b
first.The text was updated successfully, but these errors were encountered: