--enable-multi-repl --repl-no-load panics with "link: GHC not built to link this way: LinkInMemory"
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
I have a multi-package project setup. I tried to load two packages with `cabal repl --enable-multi-repl --repl-no-load` and it fails:
```
[armando@nixos:~/work/my-project/haskell]$ cabal repl --enable-multi-repl --repl-no-load my-project:library:my-project my-project-interface:library:my-project-interface
Warning: The package list for 'hackage.haskell.org' is 453 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-9.10.3 -O1
In order, the following will be built (use -v for more details):
- my-project-interface-0.1.0.0 (interactive) (lib) (configuration changed)
- my-project-0.1.0.0 (interactive) (lib) (configuration changed)
Configuring library for my-project-interface-0.1.0.0...
Preprocessing library for my-project-interface-0.1.0.0...
Configuring library for my-project-0.1.0.0...
Preprocessing library for my-project-0.1.0.0...
GHCi, version 9.10.3: https://www.haskell.org/ghc/ :? for help
ghc-9.10.3: panic! (the 'impossible' happened)
GHC version 9.10.3:
link: GHC not built to link this way: LinkInMemory
CallStack (from HasCallStack):
panic, called at compiler/GHC/Driver/Pipeline.hs:382:22 in ghc-9.10.3-b976:GHC.Driver.Pipeline
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
```
**To Reproduce**
1. Create a multi-package project (i.e. multiple packages in a `cabal.project`)
2. Try to load multiple packages with `cabal repl --enable-multi-repl --repl-no-load`
**Expected behavior**
I expect a REPL to pop without loading any modules. And then I expect to be able to load any module and have it + its transitive deps loaded (across the packages)
**System information**
- NixOS 24.05.20240512.2057814 (Uakari)
- `ghc` 9.10.3
- `cabal` 3.16.0.0
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.