haskell / haskell/cabal

Improve error message for `reference is not a tree`

Open
#8,382 1 comment 0 reactions 0 assignees View on GitHub
cabal-install: source-repository-package re: error-message re: user experience type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I ran into this on the work repo - I did `cabal build` and got this back:

```
λ ~/Projects/mercury-web-backend/ avieth/haskell.nix cabal build
fatal: reference is not a tree: 811d89e66bc714ef20f4973e87d999f21c97c4ed
```

Turns out, we had two entries in `cabal.project` for that commit:

```
source-repository-package
type: git
location: https://github.com/matthewbauer/amazonka.git
tag: 811d89e66bc714ef20f4973e87d999f21c97c4ed
--sha256: sV5aefBrSbz4wiodhE54w85tzScJgSjc1aH+L2520rs=
subdir: amazonka

source-repository-package
type: git
location: https://github.com/MercuryTechnologies/amazonka.git
tag: 811d89e66bc714ef20f4973e87d999f21c97c4ed
--sha256: sV5aefBrSbz4wiodhE54w85tzScJgSjc1aH+L2520rs=
subdir: core
```

It'd be nice if `cabal` printed out more information about the source-repository-package it was unpacking when an error like this occurs.

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.