haskell / haskell/cabal

RFC consider including identifying infos from `ghc --info` in nix-style hash

Open
#5,116 3 comments 2 reactions 0 assignees View on GitHub
cabal-install: v2-build system re: installed-package-info type: discussion type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

An annoying issue when working with GHC HEAD or other custom GHCs is that they tend to have overlapping GHC version numbers if you build multiple versions of GHC on the same day.

One important identifying detail however if provided by `ghc --info`: the git commit id from which a GHC executable was derived, e.g.

```
"Project Git commit id","0156a3d815b784510a980621fdcb9c5b23826f1e"
```

In future, maybe Hadrian could provide additional identifying fingerprints to disambiguate different GHC builds from each other.

But I think introducing the Git commit id would already help avoiding a class of subtle ABI incompatibilties between GHC snapshots sharing the same version number.

Contributor guide

Open the contributing guide

Research direction

Start by locating Cabal's nix-style hash generation and the handling of identifying information from `ghc --info`; the issue names no repository files or tests. Done means incorporating the GHC-derived Git commit id into the hash so custom or same-version GHC builds are distinguished, with tests covering the changed hash behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.