commercialhaskell / commercialhaskell/stack
Building dependency from git only works once per SHA
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### Steps to reproduce
1. Create a new empty directory and cd to it
2. Create package.yaml with contents:
```
name: repro
```
3. Create stack.yaml with contents:
```
resolver: lts-15.8
extra-deps:
- git: https://github.com/elm/compiler
commit: b303abd7c3d39ebd7f2d25655815ca9f5f45cb2e
- language-glsl-0.3.0
allow-newer: true
```
4. Run stack install elm
5. Observe that it works (or at least stack tries to build something)
6. Run stack install elm again and receive
```
No latest package revision found for: elm, dependency callstack: []
```
7. Optional bonus: Change the commit to something else like 46f35433d3a074eb22de5570e484fb5ffe0652ba or 9632ce2f8ffbd68021070ef0314eb28627ed520c
### Expected
Stack should (try to) build/install the target, even on repeat builds.
### Actual
"No latest package revision found" on any builds after the first.
Interestingly, stack exits with status code zero, implying success. But I verified that even if I delete the installed binary, stack does not try to replace it (like it normally would).
Also interestingly, if the commit SHA is changed to something else, it works again (but only once per SHA).
### Stack version
```
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
```
### Method of installation
I don't remember, sorry. I would guess
* Official binary, downloaded from stackage.org or fpcomplete's package repository
Contributor guide
Assessment
This issue has not been assessed yet.