haskell / haskell/cabal

How does cabal select a package from multiple global repositories?

Open
#6,139 4 comments 0 reactions 0 assignees View on GitHub
cabal-install: other status: consider closing type: user-question
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

When multiple repositories (e.g. both head.hackage and regular hackage) are present in `~/.cabal/config`, a single package might come from different repos, how does `cabal` decide from which repo is the package picked up? The [documentation](https://github.com/haskell/cabal/blob/master/Cabal/doc/installing-packages.rst#repository-specification) only says:

> If you want, you can configure multiple repositories, and cabal will combine them and be able to download packages from any of them.

The intuition would be selecting from the first repo which contains the package, but it's actually not the case, e.g. when running `cabal new-install dlist` or `cabal new-build` for a local package depending on `dlist`, the `dlist` package from head.hackage is *not* picked up, even when head.hackage comes before regular hackage in the global config.

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.