Command fails with multiple packages
creichert opened this issue · 3 comments
Simply having this in my stack.yaml fails the command:
packages:
- '.'
- location:
git: git@github.com:creichert/reserve.git
commit: 1264826d78a22a640d41daaecbfdd4763c86915a
extra-dep: true
$ stack exec -- shc --repo-token=$COVERALLS_REPO_TOKEN combined all
ghc-pkg: cannot find package reserve
shc: readCreateProcess: stack "exec" "--" "ghc-pkg" "field" "reserve" "key" "--simple-output" (exit 1): failed
I'm not specifically interested in generating the coverage metrics for "extra-dep" packages. I've tried several things and only disabling the location
block entirely works.
Any possible workarounds?
I can reproduce the issue adding another repository via the location field in the stack.yaml
file.
The problem is that the additional packages are downloaded in .stack-work/downloaded
; however, they are not registered like normal packages. So it's not actually possible (to the extent of my knowledge) to retrieve a package key, because it does not exist.
Therefore, replacing the key with the package id effectively makes it work, and the package will not be included in the coverage, which is what you asked for.
Do you have the possibility to check out from master and try? I made a local test and it worked.