`cabal install` symlinks non-existing executables
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
In a situation where everything is up to date, an invocation of `cabal install` might just symlink executables that it has not created and that do not exist.
In the wild: https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410
This workflow restores a cached `~/.cabal/store` from the last run.
1. `cabal build --only-dependencies` reports "up to date": https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410#step:6:7
2. `cabal install` then succeeds within a few seconds. https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410#step:7:10
It does not report linking anything, just
> Symlinking 'agda' to '/home/runner/.cabal/bin/agda'
3. The respective symlink points to `~/.cabal/store/ghc-9.10.1-69c3/Agda-2.7.0-878d927f716899ddbeb27d38180df34498e8681c6104fa4fb10682e20a27e3f9/bin/agda`. https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410#step:8:11
4. No `agda` exists there because not even the `bin` directory exists. https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410#step:8:15
```
/home/runner/.cabal/store
└── ghc-9.10.1-69c3
├── Agda-2.7.0-878d927f716899ddbeb27d38180df34498e8681c6104fa4fb10682e20a27e3f9
│ ├── cabal-hash.txt
│ ├── lib
│ └── share
```
5. `agda` is subsequently not found. https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410#step:9:11
cabal-install version is 3.12.1.0. https://github.com/agda/agda/actions/runs/10201512448/job/28223527794?pr=7410#step:3:40
Contributor guide
Assessment
This issue has not been assessed yet.