Cabal multi-repl fails with Custom build type and the error message is not helpful
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
If I understand [this blog post](https://well-typed.com/blog/2024/07/hls-multi/) correctly, cabal 3.12.1.0 is supposed to have multi-component support. Unfortunately, trying to load multiple components with HLS still produces an error which contains this line:
```
The 'repl' command does not support multiple targets at once.
```
**To Reproduce**
Steps to reproduce the behavior:
* clone https://github.com/agda/agda.git
* open `src/full/Agda/Benchmarking.hs` (in VSCode)
* wait for it to load
* open `test/Bugs/Tests.hs`
* see error
**Expected behavior**
No error.
**System information**
- Operating system: NixOS
- `cabal`, `ghc` versions:
```
$ cabal --version
cabal-install version 3.12.1.0
compiled using version 3.12.1.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.6.6
$ haskell-language-server-wrapper --version
haskell-language-server version: 2.9.0.0 (GHC: 9.6.6) (PATH: /nix/store/w7h9j7ar2q1zk3dldh5adhbs85vm9kir-haskell-language-server-2.9.0.0/bin/haskell-language-server-wrapper)
```
Contributor guide
Research direction
Reproduce the failure with the Agda files and the listed Cabal, GHC, and HLS versions. Trace how Cabal handles multiple REPL targets for a Custom build type; done means loading both components no longer produces the multiple-targets error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100