haskell / haskell/cabal

Improve error message when multiple .cabal files are in the same directory

Open
#7,395 6 comments 2 reactions 1 assignee Claimed by @fendor View on GitHub
attention: pr-welcome re: error-message re: project-file regression in 3.0 type: bug type: regression weird bug award
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
Improve error message when multiple .cabal files are in the same directory

**To Reproduce**
Have two .cabal files in the sme directory. Example

```
$ cabal init -n some-name
$ cp some-name.cabal some-name2.cabal
$ cabal v2-build
Resolving dependencies...
TODO: add support for multiple packages in a directory. Got
some-name-0.1.0.0
some-name2-0.1.0.0

CallStack (from HasCallStack):
error, called at ./Distribution/Client/ProjectOrchestration.hs:552:9 in main:Distribution.Client.ProjectOrchestration
```

**Expected behavior**
No callstack should be shown, nor a big TODO.

**System information**
- `cabal 3.4` installed via ghcup

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.