haskell / haskell/cabal

Unexpected dependency differences when using --enable-multi-repl

Open
#11,165 2 comments 0 reactions 0 assignees View on GitHub
re: multi-repl type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

## Describe the bug

Cabal-syntax, Cabal, and cabal-doctest are added to the list of dependencies when --enable-multi-repl is added to the cabal command line.

```
[b@kuusi:~/src/haskell/amazonka]$ cabal repl amazonka-core
Build profile: -w ghc-9.6.6 -O1
In order, the following will be built (use -v for more details):
- amazonka-core-2.0 (interactive) (lib) (configuration changed)
Configuring library for amazonka-core-2.0...
Preprocessing library for amazonka-core-2.0...
GHCi, version 9.6.6: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/b/Projects/dotfiles/ghci
[ 1 of 31] Compiling Amazonka.Core.Lens.Internal ( src/Amazonka/Core/Lens/Internal.hs, interpreted )
[ 2 of 31] Compiling Amazonka.Prelude ( src/Amazonka/Prelude.hs, interpreted )
[ 3 of 31] Compiling Amazonka.Crypto ( src/Amazonka/Crypto.hs, interpreted )
^CInterrupted.
||
λ
Leaving GHCi.

[b@kuusi:~/src/haskell/amazonka]$ cabal repl --enable-multi-repl amazonka-core
Warning: The package list for 'hackage.haskell.org' is 67 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-9.6.6 -O1
In order, the following will be built (use -v for more details):
- Cabal-syntax-3.12.1.0 (lib) (requires build)
- Cabal-3.12.1.0 (lib) (requires build)
- cabal-doctest-1.0.11 (lib) (requires build)
- xml-conduit-1.9.1.4 (lib:xml-conduit) (requires build)
- amazonka-core-2.0 (interactive) (lib) (configuration changed)
Starting Cabal-syntax-3.12.1.0 (lib)
^C

```

**But wait, there's more!** Why is xml-conduit being built? Why doesn't it already exist in a ready-to-use format? amazonka-core depends on it. It exists in ~/.cabal/store/ghc-9.6.6.

## To Reproduce
???

## Expected behavior

I would expect the same dependencies to be needed whether or not --enable-multi-repl is added.

## System information
- NixOS 24.11
- Cabal 3.12.1.0
- GHC 9.6.6

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two cabal repl commands from the issue on Cabal 3.12.1.0 with GHC 9.6.6, then compare their dependency plans and investigate why --enable-multi-repl adds Cabal-syntax, Cabal, cabal-doctest, and xml-conduit. Done means the differing dependencies are explained and the expected behavior is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.